
<!DOCTYPE html>
<html lang='zh-CN'>
<head>
<title>我也不曾来过/coding</title>
<meta content='on' http-equiv='x-dns-prefetch-control'>
<link href='//e.gitee.com' rel='dns-prefetch'>
<link href='//files.gitee.com' rel='dns-prefetch'>
<link href='//toscode.gitee.com' rel='dns-prefetch'>
<link href='https://cn-assets.gitee.com' rel='dns-prefetch'>
<link href='https://portrait.gitee.com' rel='dns-prefetch'>
<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="https://cn-assets.gitee.com/assets/favicon-9007bd527d8a7851c8330e783151df58.ico" />
<link rel="canonical" href="https://gitee.com/data_code/coding" />
<meta content='gitee.com/data_code/coding git https://gitee.com/data_code/coding.git' name='go-import'>
<meta charset='utf-8'>
<meta content='always' name='referrer'>
<meta content='Gitee' property='og:site_name'>
<meta content='Object' property='og:type'>
<meta content='https://gitee.com/data_code/coding' property='og:url'>
<meta content='no_portrait.png#我也不曾来过-data_code' itemprop='image' property='og:image'>
<meta content='我也不曾来过/coding' itemprop='name' property='og:title'>
<meta content='Gitee.com（码云） 是 OSCHINA.NET 推出的代码托管平台，支持 Git 和 SVN，提供免费的私有仓库托管。目前已有超过 1350万的开发者选择 Gitee。' property='og:description'>
<meta content='coding' name='Keywords'>
<meta content='Gitee.com（码云） 是 OSCHINA.NET 推出的代码托管平台，支持 Git 和 SVN，提供免费的私有仓库托管。目前已有超过 1350万的开发者选择 Gitee。' itemprop='description' name='Description'>
<meta content='pc,mobile' name='applicable-device'>

<meta content="IE=edge" http-equiv="X-UA-Compatible" />
<meta name="csrf-param" content="authenticity_token" />
<meta name="csrf-token" content="Z7wNf/62tjlWKlsgYfcy+cQlzyCspgPUNxpsrzIChyqXgqs8Kw1DFigZitZXG9B26H6BzeZ7ZawLH9DehC48RQ==" />

<link rel="stylesheet" media="all" href="https://cn-assets.gitee.com/assets/application-6c81e6f16005aafaaad6f85a1273c060.css" />
<script>
//<![CDATA[
window.gon = {};gon.locale="zh-CN";gon.sentry_dsn=null;gon.baidu_register_hm_push=null;gon.info={"controller_path":"projects","action_name":"show","current_user":{"id":10612012,"name":"我也不曾来过","username":"data_code","official":false,"admin":false,"avatar_url":"no_portrait.png#我也不曾来过-data_code"}};gon.tour_env={"current_user":"data_code","action_name":"show","original_url":"https://gitee.com/data_code/coding","controller_path":"projects"};gon.http_clone="https://gitee.com/data_code/coding.git";gon.user_project="data_code/coding";gon.manage_branch="管理分支";gon.manage_tag="管理标签";gon.enterprise_id=0;gon.create_reaction_path="/data_code/coding/reactions";gon.ipipe_base_url="https://go-api.gitee.com";gon.artifact_base_url="https://go-repo.gitee.com";gon.gitee_go_remote_url="https://go.gitee.com/assets";gon.gitee_go_active=false;gon.current_project_is_mirror=false;gon.show_repo_comment=false;gon.diagram_viewer_path="https://diagram-viewer.giteeusercontent.com";gon.ent_host="e.gitee.com";gon.cp="点击复制";gon.aready_cp="已复制";gon.is_fork=false;gon.ref="master";
//]]>
</script>
<script src="https://cn-assets.gitee.com/assets/application-1a4bf2ba7b1e19f0f3f7b1bf63122b0b.js"></script>
<script src="https://cn-assets.gitee.com/assets/lib/jquery.timeago.zh-CN-4a4818e98c1978d2419ab19fabcba740.js"></script>

<link rel="stylesheet" media="all" href="https://cn-assets.gitee.com/assets/projects/application-46b94c31ba11ae8c37eacce2bdb5603e.css" />
<script src="https://cn-assets.gitee.com/assets/projects/app-f63d225495ca7d7aafcfc0aa0c823a98.js"></script>

<script type='text/x-mathjax-config'>
MathJax.Hub.Config({
  tex2jax: {
    inlineMath: [['$','$'], ['\\(','\\)']],
    displayMath: [["$$","$$"],["\\[","\\]"]],
    processEscapes: true,
    skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code'],
    ignoreClass: "container|files",
    processClass: "markdown-body"
  }
});
</script>
<script src="https://cn-assets.gitee.com/uploads/resources/MathJax-2.7.2/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

<script>
  (function () {
    var messages = {
      'zh-CN': {
        addResult: '增加 <b>{term}</b>',
        count: '已选择 {count}',
        maxSelections: '最多 {maxCount} 个选择',
        noResults: '未找到结果',
        serverError: '连接服务器时发生错误'
      },
      'zh-TW': {
        addResult: '增加 <b>{term}</b>',
        count: '已選擇 {count}',
        maxSelections: '最多 {maxCount} 個選擇',
        noResults: '未找到結果',
        serverError: '連接服務器時發生錯誤'
      }
    }
  
    if (messages[gon.locale]) {
      $.fn.dropdown.settings.message = messages[gon.locale]
    }
  }());
</script>

<script>
  var userAgent = navigator.userAgent;
  var isLessIE11 = userAgent.indexOf('compatible') > -1 && userAgent.indexOf('MSIE') > -1;
  if(isLessIE11){
    var can_access = ""
    if (can_access != "true"){
      window.location.href = "/incompatible.html";
    }
  }
  document.addEventListener("error", function (ev) {
    var elem = ev.target;
    if (elem.tagName.toLowerCase() === 'img') {
      elem.src = "";
    }
  }, true);
</script>
</head>

<script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script>
  var title = document.title.replace(/( - Gitee| - 码云)$/, '')
      imgUrl = '';
  
  document.addEventListener('DOMContentLoaded', function(event) {
    var imgUrlEl = document.querySelector('.readme-box .markdown-body > img, .readme-box .markdown-body :not(a) > img');
    imgUrl = imgUrlEl && imgUrlEl.getAttribute('src');
  
    if (!imgUrl) {
      imgUrlEl = document.querySelector('meta[itemprop=image]');
      imgUrl = imgUrlEl && imgUrlEl.getAttribute('content');
      imgUrl = imgUrl || "https://gitee.com/static/images/logo_themecolor.png";
    }
  
    wx.config({
      debug: false,
      appId: "wxff219d611a159737",
      timestamp: "1739868829",
      nonceStr: "62bc8132444063056dfd731c12e43090",
      signature: "3eb2b4621dd751da22d174bae0b779c1b6903bbd",
      jsApiList: [
        'onMenuShareTimeline',
        'onMenuShareAppMessage'
      ]
    });
  
    wx.ready(function () {
      wx.onMenuShareTimeline({
        title: title, // 分享标题
        link: "https://gitee.com/data_code/coding", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
        imgUrl: imgUrl // 分享图标
      });
      wx.onMenuShareAppMessage({
        title: title, // 分享标题
        link: "https://gitee.com/data_code/coding", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
        desc: document.querySelector('meta[name=Description]').getAttribute('content'),
        imgUrl: imgUrl // 分享图标
      });
    });
    wx.error(function(res){
      console.error('err', res)
    });
  })
</script>

<body class='git-project lang-zh-CN'>
<header class='common-header fixed noborder' id='git-header-nav'>
<div class='ui container'>
<div class='ui menu header-menu header-container'>
<div class='git-nav-expand-bar'>
<i class='iconfont icon-mode-table'></i>
</div>
<div class='gitee-nav__sidebar'>
<div class='gitee-nav__sidebar-container'>
<div class='gitee-nav__sidebar-top'>
<div class='gitee-nav__avatar-box'>
<a href="/data_code"><img class="ui avatar image data_code-avatar" avatar="我也不曾来过-data_code" />
</a></div>
<div class='gitee-nav__info-box'>
<a href="/data_code">我也不曾来过</a>
</div>
</div>
<div class='gitee-nav__sidebar-middle'>
<div class='gitee-nav__sidebar-list'>
<ul>
<li class='gitee-nav__sidebar-item'>
<a href="/data_code"><i class='iconfont icon-ic-dashboard'></i>
<span class='gitee-nav__sidebar-name'>个人主页</span>
</a></li>
<li class='gitee-nav__sidebar-item'>
<a href="/explore"><i class='iconfont icon-ic-discover'></i>
<span class='gitee-nav__sidebar-name'>开源</span>
</a></li>
<li class='gitee-nav__sidebar-item'>
<a href="/enterprises"><i class='iconfont icon-ic-enterprise'></i>
<span class='gitee-nav__sidebar-name'>企业版</span>
</a></li>
<li class='gitee-nav__sidebar-item'>
<a href="/education"><i class='iconfont icon-ic-education'></i>
<span class='gitee-nav__sidebar-name'>高校版</span>
</a></li>
<li class='gitee-nav__sidebar-item split-line'></li>
<li class='gitee-nav__sidebar-item'>
<a href="/search"><i class='iconfont icon-ic-search'></i>
<span class='gitee-nav__sidebar-name'>搜索</span>
</a></li>
<li class='gitee-nav__sidebar-item'>
<a href="/help"><i class='iconfont icon-help-circle'></i>
<span class='gitee-nav__sidebar-name'>帮助中心</span>
</a></li>
<li class='gitee-nav__sidebar-item'>
<a href="/terms"><i class='iconfont icon-file'></i>
<span class='gitee-nav__sidebar-name'>使用条款</span>
</a></li>
<li class='gitee-nav__sidebar-item'>
<a href="/about_us"><i class='iconfont icon-issuepx'></i>
<span class='gitee-nav__sidebar-name'>关于我们</span>
</a></li>
<li class='gitee-nav__sidebar-item'>
<a href="/profile/account_information"><i class='iconfont icon-edit'></i>
<span class='gitee-nav__sidebar-name'>设置</span>
</a></li>
<li class='gitee-nav__sidebar-item'>
<a rel="nofollow" data-method="delete" href="/logout"><i class='iconfont icon-ic-logout'></i>
<span class='gitee-nav__sidebar-name'>
退出
</span>
</a></li>
</ul>
</div>
</div>
<div class='gitee-nav__sidebar-bottom'>
<div class='gitee-nav__sidebar-close-button'>
<i class='fa fa-angle-double-left'></i>
</div>
</div>
</div>
</div>

<!-- /todo 10周年活动结束后 恢复 -->
<div class='item gitosc-logo'>
<a href="https://gitee.com"><img alt='Gitee - 基于 Git 的代码托管和研发协作平台' class='ui inline image' height='28' src='/static/images/logo.svg?t=158106664' title='Gitee - 基于 Git 的代码托管和研发协作平台' width='95'>
<img alt='Gitee - 基于 Git 的代码托管和研发协作平台' class='ui inline black image' height='28' src='/static/images/logo-black.svg?t=158106664' title='Gitee - 基于 Git 的代码托管和研发协作平台' width='95'>
</a></div>
<a title="开源" class="item " href="/explore">开源
</a><a title="企业版" class="item " href="/enterprises">企业版
</a><a title="高校版" class="item " href="/education">高校版
</a><a title="私有云" class="item" target="_blank" href="https://gitee.cn?utm_source=giteecom">私有云
</a><a title="Gitee AI" class="item mr-3" id="gitee-blog" target="_blank" href="https://ai.gitee.com/?utm_sources=site_nav">Gitee AI
<sup class='ui red label'>
NEW
</sup>
</a><div class='dropdown item ui' id='my-gitee-dropdown'>
<a href="/">我的</a>
<i class='dropdown icon'></i>
<div class='menu'>
<div class='ui active dimmer inverted js-my-gitee-dropdown-loader'>
<div class='ui loader'></div>
</div>
<div class='header user-enterprises'>
<a class="pull-right" target="_blank" href="/data_code/dashboard/enterprises">全部</a>
企业
<span class='count'></span>
</div>
<div class='disabled item tip user-enterprises'>
无企业
</div>
<div class='header user-groups'>
<a class="pull-right" target="_blank" href="/data_code/dashboard/groups">全部</a>
组织
<span class='count'></span>
</div>
<div class='disabled item tip user-groups'>
无组织
</div>
<div class='header user-programs'>
项目
<span class='count'></span>
</div>
<div class='disabled item tip user-programs'>
<span class="translation_missing" title="translation missing: zh-CN.layouts.header.empty_programs">Empty Programs</span>
</div>
<div class='header user-projects'>
<a class="pull-right" target="_blank" href="/data_code/projects">全部</a>
仓库
<span class='count'></span>
</div>
<div class='disabled item tip user-projects'>
无项目
</div>
</div>
</div>
<div class='center responsive-logo'>
<a href="https://gitee.com"><img alt='Gitee - 基于 Git 的代码托管和研发协作平台' class='ui inline image' height='24' src='/static/images/logo.svg?t=158106664' title='Gitee - 基于 Git 的代码托管和研发协作平台' width='85'>
<img alt='Gitee - 基于 Git 的代码托管和研发协作平台' class='ui inline black image' height='24' src='/static/images/logo-black.svg?t=158106664' title='Gitee - 基于 Git 的代码托管和研发协作平台' width='85'>
</a></div>
<div class='right menu userbar right-header' id='git-nav-user-bar'>
<form class="ui item" id="navbar-search-form" data-text-require="搜索关键字不能少于1个" data-text-filter="搜索格式不正确" action="/search" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" />
<input type="hidden" name="type" id="navbar-search-type" />
<input type="hidden" name="fork_filter" id="fork_filter" value="on" />
<div class='ui search header-search'>
<input type="text" name="q" id="navbar-search-input" value="" class="prompt" placeholder="搜开源" />
</div>
</form>

<script>
  var can_search_in_repo = 1,
      repo = "VFhwck1rOVVXVEpQUkVab1RucFplbHBuUFQxaE56WXpaZz09YTc2M2Y=",
      reponame = "data_code/coding";
  
  $(function() {
    var $search = $('#navbar-search-form .ui.search');
    $search.search({
      apiSettings: {
        url: '/search/relative_project?q={query}',
        onResponse: function (res) {
          if (res && res.status === 200 && res.data) {
            var query = htmlSafe($search.search('get value'));
  
            res.data.map(function (item) {
              item.path_ns = '/' + item.path_ns;
              item.icon = 'iconfont icon-project-public';
            });
            res.data.unshift({
              name_ns: "在全站搜索 <b class='hl'>" + query +"</b> 相关项目",
              path_ns: '/search?fork_filter=on&q=' + query,
              icon: 'iconfont icon-search'
            });
            return res;
          } else {
            return { data: [] };
          }
        }
      },
      fields: {
        results: 'data',
        description: 'name_ns',
        url: 'path_ns',
        icon: 'icon'
      },
      minCharacters: 1,
      maxResults: 10,
      searchDelay: 250,
      showNoResults: false,
      transition: 'fade'
    });
  });
</script>

<div class='item ui dropdown empty' data-count-path='/notifications/unread_count' data-enable data-mark-notice-path='/notifications/mark' id='notice-dropdown'>
<a class="remind-button" href="/notifications"><i class='iconfont icon-remind'></i>
<div class='notice-count total'></div>
</a><div class='notice-dropdown-panel menu'>
<div class='notice-dropdown-panel-header'>
<div class='tab active' data-data-path='/notifications/notices?scope=referer' data-html-path='/notifications/referer' data-scope='referer'>
<div class='content'>
@ 我
<div class='notice-count referer'></div>
</div>
</div>
<div class='tab' data-data-path='/notifications/notices?scope=infos' data-html-path='/notifications/infos' data-scope='infos'>
<div class='content'>
通知
<div class='notice-count infos'></div>
</div>
</div>
<div class='tab' data-data-path='/notifications/notices?scope=messages' data-html-path='/notifications/messages' data-scope='messages'>
<div class='content'>
私信
<div class='notice-count messages'></div>
</div>
</div>
</div>
<div class='item notice-dropdown-panel-container'>
<div class='ui dimmer over active'>
<div class='ui loader'></div>
</div>
<div class='notice-list'></div>
<div class='notice-dropdown-panel-blank'>
暂没有新消息
</div>
</div>
<div class='notice-dropdown-panel-footer'>
<div class='action'>
<div class='side left'>
<a class="mark-notices" href="javascript: void(0);">当前标记为已读
</a></div>
<div class='side right'>
<a class="load-all" target="_blank" href="javascript: void(0);">查看全部
</a></div>
</div>
</div>
</div>
</div>

<div class='ui item' id='feature-update-notice'>
<div class='notice-update-icon'>
<a class="notice-update-popup click-knowed" title="" href="javascript:void(0)"><img alt="功能更新" title="" class="bubl_icon bubl-off-icon" src="https://cn-assets.gitee.com/assets/bulb_off-24ee940be20998aace89a3f040cbc704.svg" />
<img alt="功能更新" title="" class="bubl_icon bubl-on-icon" src="https://cn-assets.gitee.com/assets/bulb_on-3986b1dc417285398e3d15671bd8f261.svg" />
</a></div>
<div class='feature-update-notice-panel menu'>
<div class='notice-img'>
<img alt="" title="" class="notice-img-show" src="" />
</div>
<div class='notice-update-title'></div>
<div class='notice-update-des'></div>
<div class='notice-btn-list d-flex-between'>
<button name="button" type="button" class="ui basic orange button btn-notice btn-knowed click-knowed" style="margin-right: 0">我知道了</button>
<a class="ui button orange btn-notice btn-details click-knowed" target="_blank" href="">查看详情</a>
</div>
</div>
</div>

<div class='ui dropdown link item' id='git-nav-create'>
<i class='iconfont icon-add-thin'></i>
<div class='right menu'>
<a class="item" href="/projects/new"><i class='add square icon'></i>
新建仓库
</a><a class="item" href="/organizations/new"><i class='group icon'></i>
创建组织
</a><a class="item" href="/enterprises/new"><i class='icon iconfont icon-enterprise'></i>
开通企业版
</a><a class="item" href="/projects/import/url"><i class='github icon'></i>
从 GitHub / GitLab 导入仓库
</a><a class="item" href="/data_code/codes/new"><i class='code icon'></i>
发布代码片段
</a></div>
</div>
<div class='ui dropdown item' id='git-nav-user'>
<img class="ui avatar image" avatar="我也不曾来过-data_code" />
<i class='dropdown icon'></i>
<div class='right menu'>
<a class="item" href="/data_code"><i class='iconfont icon-ic-home'></i>
个人主页
</a><a class="item" href="/data_code/starred"><i class='iconfont icon-star'></i>
我的星选集
</a><a class="item" href="/profile/cps/overview"><img src="https://cn-assets.gitee.com/assets/cps_icon-9c17338b5d65451ce5190ddb75fce3c7.svg" alt="Cps icon" />
成为推荐官
</a><a class="item" href="/profile/account_information"><div class='mayun-icon my-ic-edit my-ic-edit-dims'></div>
设置
</a><div class='divider'></div>
<a class="item" target="_blank" href="https://help.gitee.com"><div class='mayun-icon my-ic-help my-ic-help-dims'></div>
帮助
</a><div class='divider'></div>
<a class="item destroy-user-session" rel="nofollow" data-method="delete" href="/logout"><div class='mayun-icon my-ic-exit my-ic-exit-dims'></div>
退出
</a></div>
</div>
<script>
  $('.destroy-user-session').on('click', function() {
    $.cookie('access_token', null, { path: '/' });
  })
</script>

</div>
</div>
</div>
</header>
<script>
  Gitee.initNavbar()
  Gitee.initRepoRemoteWay()
  $.cookie('user_locale',null)
</script>

<script>
  var userAgent = navigator.userAgent;
  var isLessIE11 = userAgent.indexOf('compatible') > -1 && userAgent.indexOf('MSIE') > -1;
  if(isLessIE11){
    var can_access = ""
    if (can_access != "true"){
      window.location.href = "/incompatible.html";
    }
  }
</script>

<div class='fixed-notice-infos'>
<div class='all-messages'>
</div>
<div class='ui container'>
<div class='flash-messages' id='messages-container'></div>
</div>
<script>
  (function() {
    $(function() {
      var $error_box, alertTip, notify_content, notify_options, template;
      template = '<div data-notify="container" class="ui {0} message" role="alert">' + '<i data-notify="dismiss" class="close icon"></i>' + '<span data-notify="message">{2}</span>' + '</div>';
      notify_content = null;
      notify_options = {};
      alertTip = '';
      $error_box = $(".flash_error.flash_error_box");
      if (notify_options.type === 'error' && $error_box.length > 0 && !$.isEmptyObject(notify_content.message)) {
        if (notify_content.message === 'captcha_fail') {
          alertTip = "验证码不正确";
        } else if (notify_content.message === 'captcha_expired') {
          alertTip = "验证码已过期，请点击刷新";
        } else if (notify_content.message === 'not_found_in_database') {
          alertTip = "帐号或者密码错误";
        } else if (notify_content.message === 'not_found_and_show_captcha') {
          alertTip = "帐号或者密码错误";
        } else if (notify_content.message === 'phone_captcha_fail') {
          alertTip = "手机验证码不通过";
        } else {
          alertTip = notify_content.message;
        }
        return $error_box.html(alertTip).show();
      } else if (notify_content) {
        if ("show" === 'third_party_binding') {
          return $('#third_party_binding-message').html(notify_content.message).addClass('ui message red');
        }
        notify_options.delay = 3000;
        notify_options.template = template;
        notify_options.offset = {
          x: 10,
          y: 30
        };
        notify_options.element = '#messages-container';
        return $.notify(notify_content, notify_options);
      }
    });
  
  }).call(this);
</script>

</div>
<script>
  (function() {
    $(function() {
      var setCookie;
      setCookie = function(name, value) {
        $.cookie(name, value, {
          path: '/',
          expires: 365
        });
      };
      $('#remove-bulletin, #remove-bulletin-dashboard').on('click', function() {
        setCookie('remove_bulletin', "gitee-maintain-1739032092");
        $('#git-bulletin').hide();
      });
      $('#remove-member-bulletin').on('click', function() {
        setCookie('remove_member_bulletin', "gitee_member_bulletin");
        $(this).parent().hide();
      });
      return $('#remove-gift-bulletin').on('click', function() {
        setCookie('remove_gift_bulletin', "gitee-gift-bulletin");
        $(this).parent().hide();
      });
    });
  
  }).call(this);
</script>
<script>
  function closeMessageBanner(pthis, type, val) {
    var json = {}
  
    val = typeof val === 'undefined' ? null : val
    $(pthis).parent().remove()
    if (type === 'out_of_enterprise_member') {
      json = {type: type, data: val}
    } else if (type === 'enterprise_overdue') {
      json = {type: type, data: val}
    }
    $.post('/profile/close_flash_tip', json)
  }
</script>

<div class='site-content'>
<div class='git-project-header'>
<div class='fixed-notice-infos'>
<div class='ui info icon floating message green' id='fetch-ok' style='display: none'>
<div class='content'>
<div class='header status-title'>
<i class='info icon status-icon'></i>
代码拉取完成，页面将自动刷新
</div>
</div>
</div>
<div class='ui info icon floating message error' id='fetch-error' style='display: none'>
<div class='content'>
<div class='header status-title'>
<i class='info icon status-icon'></i>
<span class='error_msg'></span>
</div>
</div>
</div>
</div>
<div class='ui container'>

<div class='git-project-header-details'>
<div class='git-project-header-container'>
<div class='git-project-header-actions'>
<div class='ui tiny modal project-donate-modal' id='project-donate-modal'>
<i class='iconfont icon-close close'></i>
<div class='header'>捐赠</div>
<div class='content'>
未开启捐赠功能，开启捐赠功能需要绑定 OSCHINA 帐号
</div>
<div class='actions'>
<a class='ui blank button cancel'>取消</a>
<a class='ui orange ok button' href='/profile/account_information' target='_blank'>马上绑定</a>
</div>
</div>
<div class='ui small modal wepay-qrcode'>
<i class='iconfont icon-close close'></i>
<div class='header'>
扫描微信二维码支付
<span class='wepay-cash'></span>
</div>
<div class='content weqcode-center'>
<img id='wepay-qrcode' src=''>
</div>
<div class='actions'>
<div class='ui cancel blank button'>取消</div>
<div class='ui ok orange button'>支付完成</div>
</div>
</div>
<div class='ui mini modal' id='confirm-alipay-modal'>
<div class='header'>支付提示</div>
<div class='content'>
将跳转至支付宝完成支付
</div>
<div class='actions'>
<div class='ui approve orange button'>确定</div>
<div class='ui blank cancel button'>取消</div>
</div>
</div>

<span class='ui buttons basic watch-container'>
<div class='ui dropdown button js-project-watch' data-watch-type='watching'>
<input type='hidden' value=''>
<i class='iconfont icon-watch'></i>
<div class='text'>
Watching
</div>
<i class='dropdown icon'></i>
<div class='menu'>
<a data-value="unwatch" class="item" data-remote="true" rel="nofollow" data-method="post" href="/data_code/coding/unwatch"><i class='iconfont icon-msg-read'></i>
不关注
</a><a data-value="watching" class="item" data-remote="true" rel="nofollow" data-method="post" href="/data_code/coding/watch"><i class='iconfont icon-msg-read'></i>
关注所有动态
</a><a data-value="releases_only" class="disabled item" data-remote="true" rel="nofollow" data-method="post" href="/data_code/coding/release_only_watch"><i class='iconfont icon-msg-read'></i>
仅关注版本发行动态
</a><a data-value="ignoring" class="item" data-remote="true" rel="nofollow" data-method="post" href="/data_code/coding/ignoring_watch"><i class='iconfont icon-msg-read'></i>
关注但不提醒动态
</a></div>
</div>
<style>
  .js-project-watch .text .iconfont {
    display: none; }
  .js-project-watch a, .js-project-watch a:hover {
    color: #000; }
  .js-project-watch .item > .iconfont {
    visibility: hidden;
    margin-left: -10px; }
  .js-project-watch .selected .iconfont {
    visibility: visible; }
  .js-project-watch .menu {
    margin-top: 4px !important; }
</style>
<script>
  $('.js-project-watch').dropdown({
    action: 'select',
    onChange: function(value, text, $selectedItem) {
      var type = value === 'unwatch' ? 'Watch' : 'Watching';
      $(this).children('.text').text(type);
      $(this).dropdown('set selected', value)
    }
  });
</script>

<a class="ui button action-social-count" title="1" href="/data_code/coding/watchers">1
</a></span>
<span class='basic buttons star-container ui'>
<a class="ui button unstar " data-remote="true" rel="nofollow" data-method="post" href="/data_code/coding/unstar"><i class='iconfont icon-star-solid'></i>
Starred
</a><a class="ui button star " data-remote="true" rel="nofollow" data-method="post" href="/data_code/coding/star"><i class='iconfont icon-star'></i>
Star
</a><a class="ui button action-social-count " title="0" href="/data_code/coding/stargazers">0
</a></span>
<span class='ui basic buttons fork-container' title=''>
<a id="fork-top-button" class="ui button fork " href="#"><i class='iconfont icon-fork'></i>
Fork
</a><a class="ui button action-social-count " title="0" href="/data_code/coding/members">0
</a></span>
</div>
<h2 class='git-project-title mt-0 mb-0'>
<span class="project-title"><i class="project-icon iconfont icon-project-public" title="这是一个公开仓库"></i> <a title="我也不曾来过" class="author" href="/data_code">我也不曾来过</a>/<a title="coding" class="repository" target="" style="padding-bottom: 0px; margin-right: 4px" href="/data_code/coding">coding</a></span><span class="project-badges"><a data-confirm="1.你的自荐申请将由我们人工审核，介绍完善、质量高的项目才能被推荐 &lt;br/&gt; 2.编辑可能会根据需要来调整推荐软件的描述信息 &lt;br/&gt; 3.申请提交后，&lt;strong&gt;如一个工作日内未得到推荐，则默认表示被拒&lt;/strong&gt;。" title="自荐" class="git-project-recommend-badge" rel="nofollow" data-method="post" href="/data_code/coding/recomm_self"><i class='iconfont icon-recommend recommend-icon'></i>
</a><style>
  .gitee-modal {
    width: 500px !important; }
</style>
</span>
<input type="hidden" name="project_title" id="project_title" value="我也不曾来过/coding" />
</h2>
</div>
</div>
</div>
<div class='ui small modal long' id='modal-fork-project'>
<i class='icon-close iconfont close'></i>
<div class='header'>
Fork 仓库
</div>
<div class='content fork-project-content'>
<div class='fork-info-content'>
<div class='ui segment fork_project_loader'>
<div class='ui active inverted dimmer'>
<div class='ui text loader'>加载中</div>
</div>
</div>
</div>
</div>
<div class='actions fork-action d-flex-between hide'>
<div>
</div>
<div>
<a class='cancel'>&emsp;取消&emsp;</a>
<div class='ui disabled button orange ok'>&emsp;确认&emsp;</div>
</div>
</div>
</div>
<script>
  var title_import_url = "false";
  var title_post_url = "/data_code/coding/update_import";
  var title_fork_url = "/data_code/coding/sync_fork";
  var title_project_path = "coding";
  var title_p_name = "coding";
  var title_p_id= "39696681";
  var title_description = "";
  var title_form_authenticity_token = "/N1V/72aOvro2uWXLWCbFnPzuRhJT9XMu+rx6phAQn4M4/O8aCHP1ZbpNGEbjHmZX6j39QOSs7SH702bLmz5EQ==";
  var watch_type = "watching";
  var checkFirst = false;
  
  $('.js-project-watch').dropdown('set selected', watch_type);
  $('.checkbox.sync-wiki').checkbox();
  $('.checkbox.sync-prune').checkbox();
  $('.checkbox.team-member-checkbox').checkbox();
</script>
<script>
  $(function () {
    // SemticUI 校验表单等地方要求直接return 值, 对异步支持非常不友好...
    // 从提交表单处 再用异步校验 ,控制是否提交
    var $modalFork = $('#modal-fork-project');
    var $okBtn = $modalFork.find('.ui.ok.button');
    var $currentTarget = null;
    var isSameProject = false;
  
    $('#fork-top-button, #fork-btm-button').on('click', function (e) {
      e.preventDefault();
      $modalFork.modal('show');
      setTimeout(function () {
        $.ajax({ url: '/data_code/coding/fork_project_info' }).done(function () {
          // 自定义错误消息模板,  inline : true 每个输入框后面都插入消息提示, 而非集中到一处提醒
          $.fn.form.settings.templates.prompt = function (errors) {
            return $('<div />').addClass('ui error message custom prompt label').html(errors[0]);
          };
          // 表单的内容是异步传输的js动态生成的....
          var $repoForm = $('#modal-fork-project .repo-form');
          $repoForm.form({
            on: 'change',
            inline: true,
            fields: {
              projectName: {
                identifier: 'project-name',
                rules: [
                  {
                    type: 'empty',
                    prompt: "仓库名不能为空"
                  },
                  {
                    type: 'regExp',
                    value: window.giteeRegex.projectName,
                    prompt: "仓库名只允许包含中文、字母、数字或者下划线(_)、中划线(-)、英文句号(.)、加号(+)，必须以字母、数字或者点(.)开头，不能以下划线/中划线结尾，且长度为2~191个字符"
                  },
                  {
                    type: 'maxLength[255]',
                    prompt: "仓库名只允许包含中文、字母、数字或者下划线(_)、中划线(-)、英文句号(.)、加号(+)，必须以字母、数字或者点(.)开头，不能以下划线/中划线结尾，且长度为2~191个字符"
                  }
                ]
              },
              projectPath: {
                identifier: 'project-path',
                rules: [
                  {
                    type: 'empty',
                    prompt: "路径不能为空"
                  },
                  {
                    type: 'regExp',
                    value: window.giteeRegex.projectPath,
                    prompt: "路径只允许包含字母、数字或者下划线(_)、中划线(-)、英文句号(.)，必须以字母、数字或者点(.)开头，且长度为2~191个字符"
                  }
                ]
              }
            }
          });
  
          $modalFork.find('.namespace-img-area.ui.checkbox').checkbox({
            onChecked: function () {
              $currentTarget = $(this).closest('.ui.checkbox');
              // 当前选中的空间
              isSameProject = $currentTarget[0].hasAttribute('data-any-same-projects');
              var conflictProjectName = $currentTarget.data('conflict-project-title');
              var conflictProjectUrl = $currentTarget.data('conflict-project-url');
              var conflictProjectNameSpacePath = $currentTarget.data('conflict-namespace');
              var conflictPathType = $currentTarget.find('.path-type').text();
              // fork目标
              var targetProjectName = $currentTarget.data('target-project-name');
              var targetProjectPath = $currentTarget.data('target-project-path');
              // 命名空间名称(@xxx)
              var conflictNameSpaceName = $currentTarget.find('.path-name').text();
              var $forkTargetNamespace = $('.fork-target-namespace-area');
              var $forkTargetNamespaceItem = $(this).closest('.fork-target-namespace-item')
              // 冲突 显示修改表单
              if (isSameProject) {
                //$forkTargetNamespace.addClass('same-name-editing');
                $('.fork-target-namespace-item').removeClass('same-name-editing')
                $forkTargetNamespaceItem.addClass('same-name-editing')
                $forkTargetNamespace
                  .find('.conflict-namespace-name')
                  .attr('href', `/${conflictProjectNameSpacePath}`)
                  .text(conflictNameSpaceName);
                $forkTargetNamespace
                  .find('.conflict-path')
                  .attr('href', `${conflictProjectUrl}`)
                  .text(`${conflictProjectNameSpacePath}/${targetProjectPath}`);
                $forkTargetNamespace
                  .find('.prefix-path')
                  .text(`${window.location.origin}/${conflictProjectNameSpacePath}/`);
                $forkTargetNamespace
                  .find('.conflict-path-type')
                  .text(conflictPathType.toLowerCase())
                var $nameInput = $forkTargetNamespace.find('[name="project-name"]');
                var $pathInput = $forkTargetNamespace.find('[name="project-path"]');
                $nameInput.val(targetProjectName);
                $pathInput.val(targetProjectPath);
                checkFirst = true
                // 立即校验一次
                asyncValidateForkRepoForm();
              } else {
                $('.fork-target-namespace-item').removeClass('same-name-editing')
                $forkTargetNamespaceItem.addClass('same-name-editing');
              }
              $okBtn.removeClass('disabled');
            }
          });
        });
      }, 500);
    });
    // 异步校验
    function asyncValidateForkRepoForm (successCallback) {
      var $repoForm = $('#modal-fork-project .same-name-editing .repo-form');
      var $forkTargetNamespace = $('.fork-target-namespace-area .same-name-editing');
      var $nameInput = $forkTargetNamespace.find('[name="project-name"]');
      var $pathInput = $forkTargetNamespace.find('[name="project-path"]');
      var name = $nameInput.val().trim();
      var path = $pathInput.val().trim();
      var namespace = $currentTarget ? $currentTarget.data('conflict-namespace') : '';
      if (!name || !path) return;
      $okBtn.addClass('loading');
      $.ajax('/projects/check_fork_form', {
        type: 'get',
        data: { project_name: name, project_path: path, target_namespaces: namespace },
        success: function (data) {
          if (data.status == 0) {
            successCallback && successCallback();
          } else if (data.status == -1 && Array.isArray(data.conflict_keys)) {
            if (!checkFirst) {
              data.conflict_keys.includes('name') && $repoForm.form('add prompt', 'project-name', "已存在相同仓库名");
              data.conflict_keys.includes('path') && $repoForm.form('add prompt', 'project-path', "已存在相同路径");
            } else {
              data.conflict_keys.includes('name') && data.new_name && $nameInput.val(data.new_name);
              data.conflict_keys.includes('path') && data.new_path && $pathInput.val(data.new_path);
            }
          } else {
            Flash.error("校验失败");
          }
          checkFirst = false
        },
        error: function (err) {
          Flash.error(err.responseJSON.message);
        },
        complete: function () {
          $okBtn.removeClass('loading');
          // 添加提示 弹窗变高后 刷新弹窗位置
          $modalFork.modal('refresh');
        }
      });
    }
    function forkSubmit () {
      $modalFork.modal('hide');
      // 构造一些 input 用于表单提交
      var $form = $('<form></form>');
      var $input = $('<input type="hidden" name="authenticity_token" />');
      var $inputCheck = $('<input type="hidden" name="members" />');
      var $inputCheck2 = $('<input type="hidden" name="namespace_path" />');
      var checkedPath = $('.checkbox.checked > input[name=namespace_path]').val();
      // fork存在冲突, 修改后的表单:
      if (isSameProject) {
        // 获取最新表单数据
        var $forkTargetNamespace = $('.fork-target-namespace-area .same-name-editing');
        var name = $forkTargetNamespace.find('[name="project-name"]').val().trim();
        var path = $forkTargetNamespace.find('[name="project-path"]').val().trim();
        var $projectName = $('<input type="hidden" name="name" />');
        var $projectPath = $('<input type="hidden" name="path" />');
        $projectName.val(name);
        $projectPath.val(path);
        $form.append($projectName);
        $form.append($projectPath);
      }
      $form.hide();
      $form.attr('method', 'post');
      $form.attr('action', '/' + checkedPath + '/fork_project/data_code%2Fcoding');
      $input.attr('value', $('meta[name="csrf-token"]').attr('content'));
      $inputCheck.attr('value', $('.checkbox.checked > input[name=members]').val());
      $inputCheck2.attr('value', checkedPath);
      $form.append($input);
      $form.append($inputCheck);
      $form.append($inputCheck2);
      $form.appendTo('body');
      $form.submit();
    }
    $modalFork.modal({
      transition: 'fade',
      closable: true,
      centered: false,
      observeChanges: true,
      onApprove: function () {
        // 存在同名冲突时, 需要修改仓库信息, 再进行校验同名
        // 判断当前选中的空间类型, 用于决定是否需要修改路径仓库名,验证表单
        if (isSameProject) {
          var $repoForm = $('#modal-fork-project .same-name-editing .repo-form');
          $repoForm.form('validate form');
          var isRepoInfoValid = $repoForm.form('is valid'); // 前端校验通过
          // 由于是form提交和ajax检测结合..., 防止意外篡改 提交前必定校验一次, 通过后自动submit
          if (isRepoInfoValid) {
            // SemticUI add prompt 自定义验证连续执行太快, 会消失掉重复再出现再消失.
            setTimeout(function () {
              asyncValidateForkRepoForm(function () {
                forkSubmit();
              });
            }, 200);
          } else {
            $repoForm.form('validate form');
          }
        } else {
          // 正常 frok
          forkSubmit();
        }
        return false;
      }
    });
    $modalFork.find('.close-button').on('click', function () {
      $modalFork.modal('hide');
    });
  });
</script>
<style>
  i.loading, .icon-sync.loading {
    -webkit-animation: icon-loading 1.2s linear infinite;
    animation: icon-loading 1.2s linear infinite;
  }
  .qrcode_cs {
    float: left;
  }
  .check-sync-wiki {
    float: left;
    height: 28px;
    line-height: 28px;
  }
  .sync-wiki-warn {
    color: #e28560;
  }
</style>

<div class='git-project-nav'>
<div class='ui container'>
<div class='ui secondary pointing menu'>
<a class="item active " href="/data_code/coding"><i class='iconfont icon-code'></i>
代码
</a><a class="item " href="/data_code/coding/issues"><i class='iconfont icon-task'></i>
Issues
<span class='ui mini circular label'>
0
</span>
</a><a class="item " href="/data_code/coding/pulls"><i class='iconfont icon-pull-request'></i>
Pull Requests
<span class='ui mini circular label'>
0
</span>
</a><a class="item " href="/data_code/coding/wikis"><i class='iconfont icon-wiki'></i>
Wiki
</a><a class="item  " href="/data_code/coding/repository/stats/master"><i class='iconfont icon-statistics'></i>
统计
</a><a class="item " href="/data_code/coding/gitee_go"><i class='iconfont icon-workflow'></i>
流水线
</a><div class='item'>
<div class='ui pointing top right dropdown git-project-service'>
<div>
<i class='iconfont icon-service'></i>
服务
<i class='dropdown icon'></i>
</div>
<div class='menu' style='display:none'>
<a class="item" href="/data_code/coding/pages"><img src="/static/images/logo-en.svg" alt="Logo en" />
<div class='item-title'>
Gitee Pages
</div>
</a><a class="item" href="/data_code/coding/javadoc"><img src="https://cn-assets.gitee.com/assets/maven-bd58aee84f266d64d4b8ce5b006a9fcf.png" alt="Maven" />
<div class='item-title'>
JavaDoc
</div>
</a><a class="item" href="/data_code/coding/phpdoc"><img src="https://cn-assets.gitee.com/assets/phpdoc-a99f87c2feaa2fd99e5065377a39487e.png" alt="Phpdoc" />
<div class='item-title'>
PHPDoc
</div>
</a><a class="item" href="/data_code/coding/quality_analyses?platform=sonar_qube"><img src="https://cn-assets.gitee.com/assets/sonar_mini-5e1b54bb9f6c951d97fb778ef623afea.png" alt="Sonar mini" />
<div class='item-title'>
质量分析
</div>
</a><a class="item" href="/data_code/coding/gitee_scans"><img src="https://cn-assets.gitee.com/assets/giteescan-cd9ab4076bd751faf7e30888eb10f782.png" alt="Giteescan" />
<div class='item-title'>Gitee Scan</div>
</a><a class="item" href="/data_code/coding/codecheck/report?branch=master"><img src="https://cn-assets.gitee.com/assets/CodeCheck-70a10cf889c51df6f00bf159c8e12374.svg" alt="Codecheck" />
<div class='item-title'>CodeCheck</div>
</a><a class="item" href="/data_code/coding/fosseye_cves"><img src="https://cn-assets.gitee.com/assets/service/cve-73044c7335decc74687a3196913c347b.svg" alt="Cve" />
<div class='item-title'>
CVE 漏洞扫描
</div>
</a><a class="item" target="_blank" href="https://gitee.com/help/articles/4193"><img src="https://cn-assets.gitee.com/assets/jenkins_for_gitee-554ec65c490d0f1f18de632c48acc4e7.png" alt="Jenkins for gitee" />
<div class='item-title'>
Jenkins for Gitee
</div>
</a><a class="item" target="_blank" href="https://gitee.com/help/articles/4318"><img src="https://cn-assets.gitee.com/assets/cloudbase-1197b95ea3398aff1df7fe17c65a6d42.png?20200925" alt="Cloudbase" />
<div class='item-title'>
腾讯云托管
</div>
</a><a class="item" target="_blank" href="https://gitee.com/help/articles/4330"><img src="https://cn-assets.gitee.com/assets/cloud_serverless-686cf926ced5d6d2f1d6e606d270b81e.png" alt="Cloud serverless" />
<div class='item-title'>
腾讯云 Serverless
</div>
</a><a class="item" href="/data_code/coding/open_sca"><img src="https://cn-assets.gitee.com/assets/open_sca/logo-9049ced662b2f9936b8001e6f9cc4952.png" alt="Logo" />
<div class='item-title'>
悬镜安全
</div>
</a><a class="item" target="_blank" href="https://help.gitee.com/devops/connect/Aliyun-SAE"><img src="https://cn-assets.gitee.com/assets/SAE-f3aa9366a1e2b7fff4747402eb8f10c3.png" alt="Sae" />
<div class='item-title'>
阿里云 SAE
</div>
</a><a class="item" id="update-codeblitz-link" target="_blank" href="https://codeblitz.cloud.alipay.com/gitee/data_code/coding/tree/master/"><img style="width:100px;margin-top:4px" src="https://cn-assets.gitee.com/assets/Codeblitz-8824e38875a106e16e29ff57ec977b08.png" alt="Codeblitz" />
<div class='item-title'>
Codeblitz
</div>
</a><button class='ui orange basic button quit-button' id='quiting-button'>
我知道了，不再自动展开
</button>
</div>
</div>
</div>
<a class="item d-flex d-flex-center " href="/data_code/coding/settings"><i class='iconfont icon-settings'></i>
<div class='text ml-05 setting-text'>管理</div>
</a></div>
</div>
</div>
<script>
  $('.git-project-nav .ui.dropdown').dropdown({ action: 'nothing' });
  var gitee_reward_config = JSON.parse(localStorage.getItem('gitee_reward_config') || null) || false
  var $settingText = $('.setting-text')
  // 如果没有访问过
  if(!gitee_reward_config) $settingText.addClass('red-dot')
  $('.git-project-service').dropdown({
    on: 'click',
    action: 'nothing',
    onShow: function () {
      const branch = 'master'
      let newUrl = `https://codeblitz.cloud.alipay.com/gitee/data_code/coding/tree/`
      const url = decodeURIComponent(window.location.pathname);
      const startIndex = url.indexOf('master');
      if (startIndex !== -1) {
        newUrl = newUrl + url.substring(startIndex); // 从分支名开始截取
      }else{
        newUrl = newUrl + branch
      }
      const linkElement = document.getElementById("update-codeblitz-link");
      linkElement.setAttribute("href", newUrl);
    },
  })
</script>
<style>
  .git-project-nav i.checkmark.icon {
    color: green;
  }
  #quiting-button {
    display: none;
  }
  
  .git-project-nav .dropdown .menu.hidden:after {
    visibility: hidden !important;
  }
</style>
<script>
  isSignIn = true
  isClickGuide = true
  $('#git-versions.dropdown').dropdown();
  $.ajax({
    url:"/data_code/coding/access/add_access_log",
    type:"GET"
  });
  $('#quiting-button').on('click',function() {
    $('.git-project-service').click();
    if (isSignIn) {
      $.post("/projects/set_service_guide")
    }
    $.cookie("Serve_State", true, { expires: 3650, path: '/'})
    $('#quiting-button').hide();
  });
  if (!(isClickGuide || $.cookie("Serve_State") == 'true')) {
    $('.git-project-service').click()
    $('#quiting-button').show()
  }
</script>

</div>
<div class='ui container'>

<div class='git-project-content-wrapper'>

<div class='ui grid tree-bbb' id='project-wrapper'>
<div class='project-left-side-contaner wide column' id='project-left-side-contaner' style='display: none;'>
<script src="https://cn-assets.gitee.com/webpacks/vendors_lib-7ff466a6da368d391eda.js" defer="defer"></script>
</div>
<div class='twelve wide column right-wrapper'>
<div id='git-project-search-panel' style='display: none;'>
<a href='javascript: void(0);' id='back-to-list'>
<i class='angle left icon'></i>
返回
</a>
<div class='ui icon input search-input'>
<i class='iconfont icon-search icon'></i>
<input id='search-name' maxlength='40' placeholder='搜索文件' type='text'>
</div>
</div>
<div class='git-project-content' id='git-project-content'>
<div class='git-project-desc-wrapper'>
<div class='ui info message no-license'>
你当前开源项目尚未选择许可证（LICENSE），<strong><a class="project-license__create">点此选择并创建开源许可</a></strong>
</div>
<div class='license-selector'>
<div class='ui inverted dimmer'>
<div class='ui active loader'></div>
</div>
<div class='license-foreword'>
<p>该工具旨在帮助用户理解对于自由和开源软件许可协议的偏好。用户必须自己阅读这些许可协议。</p><p>在将许可协议适用于你的项目之前，阅读并完全理解你选择的许可协议是非常重要的。支撑该工具运行的许可类型分类，会不可避免地有些缩减。因此，不能也切不可将该工具的输出信息视为法律意见。</p><p><strong>切记：必须阅读并理解你选择的许可协议。</strong></p><p>许可证向导由 <a target='_blank' href='http://oss-watch.ac.uk/'>OSS Watch</a> 原创，部分内容经 <a target='_blank' href='https://kaiyuanshe.cn/'>开源社</a> 汉化，基于 <a target='_blank' href='https://creativecommons.org/licenses/by-sa/2.0/uk/'>Creative Commons Attribution-ShareAlike 2.0 England & Wales license </a>  许可证发布</p>
<div>
<a class='skip-step'>
创建自定义许可证
</a>
<div></div>
<button class='ui orange button foreword-step' type='button'>开始选择</button>
</div>
</div>
<div class='license-container'>
<div class='license-form'>
<div class='form-container'>
<div class='license-container_step mb-2'>
<div class='ui ordered steps'>
<div class='step'>
<div class='content'>
<div class='title'>流行并广泛使用</div>
<div class='description'>OSI 认证 / 知名且流行的协议</div>
</div>
</div>
<div class='step'>
<div class='content'>
<div class='title'>代码复用条件</div>
<div class='description'>声明代码重复使用限制</div>
</div>
</div>
<div class='step'>
<div class='content'>
<div class='title'>司法管辖限制</div>
<div class='description'>声明司法管辖区域范围</div>
</div>
</div>
<div class='step'>
<div class='content'>
<div class='title'>专利授权限制</div>
<div class='description'>声明专利授权许可</div>
</div>
</div>
<div class='step'>
<div class='content'>
<div class='title'>增强型归属限制</div>
<div class='description'>是否要求声明增强型归属</div>
</div>
</div>
<div class='step'>
<div class='content'>
<div class='title'>&quot;隐私漏洞&quot;使用限制</div>
<div class='description'>是否使用解决&quot;隐私漏洞&quot;的许可协议</div>
</div>
</div>
<div class='step'>
<div class='content'>
<div class='title'>推广声明限制</div>
<div class='description'>是否禁止利用原作名字推广</div>
</div>
</div>
</div>
</div>
<div class='license-form__list'>
<div class='step-q1'>
<strong>你想将结果限定为开放源代码促进会（OSI）所描述的“流行并广泛使用，或拥有广泛社区群”的许可协议吗？<br> 这将以牺牲一些更冷僻但或许有用的特征为代价来确保该许可协议成为“主流”协议。</strong>
<div>
<div class='ui selection dropdown' data-choice='q1'>
<input type='hidden'>
<i class='dropdown icon'></i>
<div class='default text'>请选择</div>
<div class='menu'>
<div class='item' data-value='q1strong_-1'>请选择</div>
<div class='item' data-value='q1strong_careless'>我不在乎</div>
<div class='item' data-value='q1strong_1'>只选择流行并广泛使用或带有强烈社区支持的许可协议</div>
<div class='item' data-value='q1strong_0'>选择所有许可协议</div>
</div>
</div>
</div>
</div>
<div class='step-q2a'>
<p>所有自由和开源许可协议允许他人对你的代码进行修改，并且将修改版本提供给第三方使用。你的许可协议可以附加条件——明确指出哪些许可协议可用于这些修改版。这些条件可使你的代码保持自由，但也会使有些人无法重复使用你的代码。</p><strong>你想对代码的重复使用设置许可条件吗？ 如果不设置，你的许可协议就将成为“获准”许可协议之一。</strong>
<div>
<div class='ui selection dropdown' data-choice='q2a'>
<input type='hidden'>
<i class='dropdown icon'></i>
<div class='default text'>请选择</div>
<div class='menu'>
<div class='item' data-value='q2anocopyleft_-1'>请选择</div>
<div class='item' data-value='q2anocopyleft_0'>我想对代码的重复使用设置许可条件</div>
<div class='item' data-value='q2anocopyleft_1'>我不想对代码的重复使用设置许可条件</div>
</div>
</div>
</div>
</div>
<div class='step-q2b'>
<p>只有选择了包含再用许可条件时才需回答此问题。</p><p>你选择包含特定的再用许可条件。这些条件有时被称为“著佐权”，分为两种基本类型。</p><p>强著佐权：如果一个软件项目包含你的部分代码，则整个项目都必须按照你最初的许可协议方式对外发行（如果发行的话）。其结果是，此代码的所有新增源代码都是公开可获取的。</p><p>弱著佐权：如果一个软件项目包含你的部分代码，则项目中你原始创作的部分必须按照你最初的许可协议方式对外发行（如果发行的话），而其它部分的发行许可协议则由项目人自由选择，即使这部分作为整体只是你代码的更改版本。其结果是，此代码的部分新增源代码可能无法公开获取。</p><strong>如果你在前一个问题中选择包含许可条件：你想要哪种形式的著佐权？</strong>
<div>
<div class='ui selection dropdown' data-choice='q2b'>
<input type='hidden'>
<i class='dropdown icon'></i>
<div class='default text'>请选择</div>
<div class='menu'>
<div class='item' data-value='q2bstrong_-1'>请选择</div>
<div class='item' data-value='q2bstrong_1'>强著佐权 （Copyleft）</div>
<div class='item' data-value='q2bweak_1'>弱著佐权 （Copyleft）</div>
</div>
</div>
</div>
</div>
<div class='step-q2c'>
<p>只有前一个问题的答案为“弱著佐权”时，才需回答此问题。</p><p>“弱著佐权”的定义如下：</p><p>弱著佐权：如果一个软件项目包含你的部分代码，则项目中你原始创作的部分必须按照你最初的许可协议方式对外发行（如果发行的话），而其它部分的发行许可协议则由项目人自由选择，即使这部分作为整体只是你代码的更改版本。其结果是，此代码的部分新增源代码可能无法公开获取。</p><p>现在，我们需要确定，修改版的哪些部分可以适用其它许可协议（不同于你原始的许可协议）：</p><p>模块级：将项目中各功能代码段（“模块”）视为相互独立的部分。如果一个模块包含你的某些代码，那么该模块需使用你的许可协议。否则，代码的作者可自由选择适用的许可协议。</p><p>文件级：将项目中由计算机文件系统唯一标志的代码-数据组合（“文件”）视为相互独立的部分。如果一个文件包含你的某些代码，那么该文件需使用你的许可协议。否则，代码的作者可自由选择适用的许可协议。</p><p>库接口级：你的代码被视为软件库——可由其它程序通过指定接口使用的软件功能集。对库的所有修改，如需发行，则必须按照你最初的许可协议对外发行。使用你的库、并可能连同库一起发行的程序则不需要。</p><strong>如果你在前一个问题中选择“弱著佐权”，请问你想要哪种形式的弱著佐权？我们需要确定，修改版的哪些部分可以适用不同的许可协议。</strong><br><strong>我们需要确定，修改版的哪些部分可以携带不同的许可。</strong>
<div>
<div class='ui selection dropdown' data-choice='q2c'>
<input type='hidden'>
<i class='dropdown icon'></i>
<div class='default text'>请选择</div>
<div class='menu'>
<div class='item' data-value='q2c_-1'>请选择</div>
<div class='item' data-value='q2cmod_1'>模块级别</div>
<div class='item' data-value='q2cfile_1'>文件级别</div>
<div class='item' data-value='q2clib_1'>库接口级别</div>
</div>
</div>
</div>
</div>
<div class='step-q3'>
<p>“司法管辖区域”指的是一个特定区域或领域及其法律体系。当某个许可协议指定了司法管辖区时，许可人和被许可人达成共识：双方应依照该区域的法律法规对该许可协议条款进行解释，如有违反该许可协议的条款，应在该司法管辖区区域内诉诸采取法律途径解决行动。举例来说，如果一个英国人按照 Mozilla 公共许可协议 v1.1 许可代码，之后发现有人在未遵守该许可协议条件的情况下使用其代码，英国人应在“位于加州圣克拉拉县的北加州联邦法院”对该违约人提起法律诉讼。但是请注意，自由和开源软件所有者一般不会向违反许可条款者要求金钱赔偿，只是要求违约人同意遵守条款或终止使用相关代码。因此通常不需要真的将违约人告上法庭，尤其在需要维护公众形象和声誉的情况下。通常，只要向对方发出守约要求就很有效。如若不然，公开其违约行为也可促使对方遵守约定。</p><p>不是所有自由和开源软件许可协议都会指定一个司法管辖区。实际上，大部分许可协议并未涉及。在这种情况下，必要时你可选择任何司法管辖区。但是，很有可能你要起诉的人会拒绝应诉，或者因为你选择的管辖地不利于他们而提出管辖权异议。</p><p>最后，部分自由和开源软件许可协议规定，司法管辖区的选择权归许可人所有，或自动认定为许可人住所地（居住地或营业场所所在地）。</p><strong>你想如何在你的许可协议中规定司法管辖权问题呢？</strong>
<div>
<div class='ui selection dropdown' data-choice='q3'>
<input type='hidden'>
<i class='dropdown icon'></i>
<div class='default text'>请选择</div>
<div class='menu'>
<div class='item' data-value='q3juris_-1'>请选择</div>
<div class='item' data-value='q3juris_careless'>我不在乎——即使指定了境外地址</div>
<div class='item' data-value='q3juris_0'>我想使用未涉及该话题的许可协议</div>
<div class='item' data-value='q3juris_1'>我想将自己所在区域作为司法管辖区</div>
</div>
</div>
</div>
</div>
<div class='step-q4a'>
<p>你或你所在的机构拥有任何软件专利吗？如果有，并且根据自由或开源软件许可协议发布了相关代码，那么你极有可能授权一群人使用与该代码相关的专利权——即使该许可协议并没有明确说明。在很多区域，比如英国和美国，许可某人执行某项特定的操作（如复制或改写代码），意味着默示许可其采用一切必要的步骤来实现该操作。几乎可以肯定，这些默示许可的步骤包含了软件专利的使用。请注意，改写你代码的人不能通过扩展其功能来获取你的其他软件专利——你授权的只是已发布代码对应的专利，不包括该代码的其他任何形式。</p><p>部分自由和开源软件许可协议对于专利授权没有任何明文规定——但是，如上文所述，这并不意味着他们未授予专利权。</p><p>部分自由和开源软件许可协议明确地授予必要的专利权，以使用、改写以及发行该软件。</p><strong>你对所需许可协议的专利授权问题持何种态度呢？</strong>
<div>
<div class='ui selection dropdown' data-choice='q4a'>
<input type='hidden'>
<i class='dropdown icon'></i>
<div class='default text'>请选择</div>
<div class='menu'>
<div class='item' data-value='q4apat_-1'>请选择</div>
<div class='item' data-value='q4apat_careless'>我不在乎——我想自己并不拥有专利，即使有也不在乎怎样处理它们</div>
<div class='item' data-value='q4apat_0'>我想使用未涉及专利授权的许可协议，虽然它可能已授权专利</div>
<div class='item' data-value='q4apat_1'>我想使用明确授予专利权的许可协议（如果有）</div>
</div>
</div>
</div>
</div>
<div class='step-q4b'>
<p>自由或开源软件许可协议中也可以包含“专利报复”的条款。此类条款的基本含义是，任何提起法律诉讼称被许可的软件包含其某一项专利的人将失去你之前许可其复制、使用、改编和发行代码的权利。该条款用于阻止人们提起此类法律诉讼。</p><strong>你对于在许可中使用专利报复条款有何看法？</strong>
<div>
<div class='ui selection dropdown' data-choice='q4b'>
<input type='hidden'>
<i class='dropdown icon'></i>
<div class='default text'>请选择</div>
<div class='menu'>
<div class='item' data-value='q4bpatret_-1'>请选择</div>
<div class='item' data-value='q4bpatret_careless'>我不在乎——请提供全部许可协议</div>
<div class='item' data-value='q4bpatret_1'>我想使用包含专利报复条款的许可协议</div>
<div class='item' data-value='q4bpatret_0'>我想使用未包含专利报复条款的许可协议</div>
</div>
</div>
</div>
</div>
<div class='step-q5'>
<p>所有自由或开源软件许可协议指定，任何人发行或改写软件都必须在其发布内容中署名软件的原作者。部分自由或开源软件许可协议更进一步要求这种认可必须采取特定的形式或者出现在特定情形中，例如在每次软件运行时出现在用户界面。这种规定有时被称为“增强型归属 (enhanced attribution)”或“勋章授予 (badge ware)”。</p><strong>你的许可协议需要规定“增强型归属(enhanced attribution)”吗？</strong>
<div>
<div class='ui selection dropdown' data-choice='q5'>
<input type='hidden'>
<i class='dropdown icon'></i>
<div class='default text'>请选择</div>
<div class='menu'>
<div class='item' data-value='q5enhattr_-1'>请选择</div>
<div class='item' data-value='q5enhattr_careless'>我不在乎——请提供全部许可协议</div>
<div class='item' data-value='q5enhattr_1'>我想使用指定“增强型归属”的许可协议</div>
<div class='item' data-value='q5enhattr_0'>我想使用未指定“增强型归属”的许可协议</div>
</div>
</div>
</div>
</div>
<div class='step-q6'>
<p>如果有人改写和完善你的代码，创建在线服务或者内部解决方案，大部分自由和开源软件许可协议并未规定，改写版或增强版代码的源代码必须对外发布。大部分自由和开源软件许可协议规定发行的条件是源代码必须已发布。通常，使用代码在网络上提供服务，或者在某个机构内部配置代码，都不被认定为这些许可协议定义的发布代码。自由和开源软件社区中部分成员，认为这些也被称为”应用服务提供商（ASP）漏洞“或”隐私漏洞“的现象有待解决。他们的观点是，为公平起见，所有受益于代码的人都必须通过他们的工作回馈社会，即使严格意义上来说他们并没有发布代码。</p><p>为了解决这个问题，部分自由或开源软件许可协议将源代码的发布设为代码散布、内部配置和/或使用软件提供网络服务的前提条件，尤其当这种代码是网络服务的基础代码或者可能在内部使用。</p><strong>想让你的许可协议不存在“隐私漏洞”现象吗？</strong>
<div>
<div class='ui selection dropdown' data-choice='q6'>
<input type='hidden'>
<i class='dropdown icon'></i>
<div class='default text'>请选择</div>
<div class='menu'>
<div class='item' data-value='q6noloophole_-1'>请选择</div>
<div class='item' data-value='q6noloophole_careless'>我不在乎——请提供全部许可协议</div>
<div class='item' data-value='q6noloophole_1'>我想使用解决“隐私漏洞”的许可协议</div>
<div class='item' data-value='q6noloophole_0'>我想使用未解决“隐私漏洞”的许可协议</div>
</div>
</div>
</div>
</div>
<div class='step-q7'>
<p>部分自由和开源软件许可协议明确禁止利用原创作者的名字推广基于该作者的代码提供的产品或服务。</p><strong>你的许可协议需要引入“禁止推广“条款吗？</strong>
<div>
<div class='ui selection dropdown' data-choice='q7'>
<input type='hidden'>
<i class='dropdown icon'></i>
<div class='default text'>请选择</div>
<div class='menu'>
<div class='item' data-value='q7nopromo_-1'>请选择</div>
<div class='item' data-value='q7nopromo_careless'>我不在乎——请提供全部许可协议</div>
<div class='item' data-value='q7nopromo_1'>我想使用禁止推广的许可协议</div>
<div class='item' data-value='q7nopromo_0'>我想使用未禁止推广的许可协议</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class='text-muted mt-2 mb-2'>
筛选结果
</div>
<div class='licences_section'></div>
</div>
<div class='licences-action mt-2'>
<div>
<a class='skip-step'>
创建自定义许可证
</a>
</div>
<div>
<a class='pre-step'>上一步</a>
<button class='ml-2 ui small orange button next-step' type='button'>下一页</button>
<button class='ml-2 ui small orange button choice-license' type='button'>使用该许可证</button>
</div>
</div>
</div>
</div>
<style>
  @media only screen and (max-height: 820px) {
    .license-modal.gitee-modal.ui.modal:not(.is-foreword) {
      top: 0; }
  
    .license-modal-wrap.ui.dimmer.modals:not(.is-foreword-modals) {
      -webkit-box-align: normal;
          -ms-flex-align: normal;
              align-items: normal;
      -webkit-box-orient: initial;
      -webkit-box-direction: initial;
          -ms-flex-direction: initial;
              flex-direction: initial; } }
  @media only screen and (max-width: 767px) {
    .license-modal {
      overflow: auto; }
      .license-modal .licences-action {
        margin-bottom: 16px; }
      .license-modal > .content {
        overflow: auto; }
      .license-modal .license-form {
        height: auto !important; }
      .license-modal .licences_section .portlet-section {
        display: block !important; }
        .license-modal .licences_section .portlet-section .portlet {
          max-width: initial; }
      .license-modal .ui.ordered.steps {
        width: 100%; } }
  .ui.dimmer.modals {
    -webkit-box-pack: center !important;
        -ms-flex-pack: center !important;
            justify-content: center !important; }
  
  .license-modal {
    width: 90vw !important;
    position: static !important;
    max-height: 90vh;
    height: 820px;
    margin-top: 0 !important;
    margin-left: 0 !important;
    margin: 0 !important; }
    .license-modal:not(.is-foreword) {
      min-height: 820px; }
    .license-modal .actions {
      display: none; }
    .license-modal .license-selector {
      display: block; }
    .license-modal .content {
      height: calc(100% - 44px); }
    .license-modal.is-foreword {
      width: 710px !important;
      height: auto !important; }
  
  .license-selector {
    display: none; }
  
  .license-selector, .license-container {
    height: 100%; }
  
  .license-selector .license-foreword > div {
    margin-top: 48px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center; }
  
  .license-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between; }
    .license-container .ui.selection.dropdown {
      display: inline-block; }
      .license-container .ui.selection.dropdown .text-fill {
        visibility: hidden;
        height: 0; }
    .license-container .license-form {
      display: -webkit-box;
      display: -ms-flexbox;
      display: flex;
      -webkit-box-orient: vertical;
      -webkit-box-direction: normal;
          -ms-flex-direction: column;
              flex-direction: column;
      height: 90%; }
      .license-container .license-form .form-container {
        -webkit-box-flex: 0;
            -ms-flex: 0 0 auto;
                flex: 0 0 auto; }
    .license-container .license-form__list > div {
      display: none; }
    .license-container .license-form__list p {
      margin: 0em 0em 8px;
      line-height: 18px; }
    .license-container .license-form__list .ui.message {
      background: #F8F8F8; }
    .license-container .ui.dropdown {
      display: block;
      margin-top: 16px; }
    .license-container .licences-action {
      display: -webkit-box;
      display: -ms-flexbox;
      display: flex;
      -webkit-box-pack: justify;
          -ms-flex-pack: justify;
              justify-content: space-between;
      -webkit-box-align: center;
          -ms-flex-align: center;
              align-items: center;
      height: 28px;
      width: 100%; }
    .license-container .text-muted {
      font-size: 16px; }
    .license-container .licences_section {
      overflow: auto; }
      .license-container .licences_section .portlet {
        border: 1px solid #DCE3E8;
        margin-bottom: 8px;
        cursor: pointer; }
        .license-container .licences_section .portlet.selected {
          border-color: #f38d30;
          color: #f38d30; }
          .license-container .licences_section .portlet.selected .portlet-header {
            background: linear-gradient(45deg, #fe7300, #ffae6b);
            color: white; }
            .license-container .licences_section .portlet.selected .portlet-header > div {
              color: white; }
          .license-container .licences_section .portlet.selected .portlet-content {
            color: black; }
          .license-container .licences_section .portlet.selected .ui.divider {
            border-color: #f38d30;
            border-top: none;
            margin-bottom: 1px; }
        .license-container .licences_section .portlet .portlet-content {
          left: 60% !important;
          right: initial !important; }
          .license-container .licences_section .portlet .portlet-content > div {
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis; }
        .license-container .licences_section .portlet .portlet-header, .license-container .licences_section .portlet .portlet-content {
          padding: 8px 18px; }
        .license-container .licences_section .portlet .ui.divider {
          margin: 0; }
        .license-container .licences_section .portlet .portlet-action {
          position: relative;
          padding: 8px 16px;
          display: -webkit-box;
          display: -ms-flexbox;
          display: flex; }
          .license-container .licences_section .portlet .portlet-action span {
            -webkit-box-flex: 1;
                -ms-flex: 1;
                    flex: 1;
            text-align: center; }
          .license-container .licences_section .portlet .portlet-action .divider {
            width: 1px;
            background: rgba(34, 36, 38, 0.15); }
          .license-container .licences_section .portlet .portlet-action .choice-license {
            cursor: pointer; }
      .license-container .licences_section .portlet-section {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        margin-bottom: 16px; }
        .license-container .licences_section .portlet-section > div {
          min-width: 0;
          width: 100%; }
        .license-container .licences_section .portlet-section:last-child {
          margin-bottom: 0; }
        .license-container .licences_section .portlet-section .portlet {
          margin-right: 24px; }
          .license-container .licences_section .portlet-section .portlet:last-child {
            margin-right: 0; }
      .license-container .licences_section .portlet-header {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: justify;
            -ms-flex-pack: justify;
                justify-content: space-between;
        font-weight: 500; }
        .license-container .licences_section .portlet-header.red > div {
          color: #c67777; }
        .license-container .licences_section .portlet-header.green > div {
          color: green; }
        .license-container .licences_section .portlet-header.yellow > div {
          color: #c39a1c; }
      .license-container .licences_section .portlet-fill {
        visibility: hidden;
        margin-right: 24px; }
        .license-container .licences_section .portlet-fill:last-child {
          margin-right: 0; }
    .license-container .license-container_step.mb-2 .step.completed.selected:before {
      color: #989DAD; }
    .license-container .license-container_step.mb-2 .step.active {
      background: #FE7300; }
      .license-container .license-container_step.mb-2 .step.active:after {
        background: #FE7300; }
      .license-container .license-container_step.mb-2 .step.active:before {
        color: white; }
      .license-container .license-container_step.mb-2 .step.active .title, .license-container .license-container_step.mb-2 .step.active .description {
        color: white; }
    .license-container .license-container_step.mb-2 .step.can-choice {
      cursor: pointer; }
    .license-container .license-container_step.mb-2 .step {
      margin-bottom: 10px; }
    .license-container .licences-action button {
      padding: .357143em 16px !important; }
</style>
<script>
  (function () {
  
    $('.license-form__list > div').each(function () {
      var $dropdown = $(this).find('.dropdown');
      var text = '';
      $dropdown.find('.item').each(function () {
        if ($(this).html().length > text.length) {
          text = $(this).html();
        }
      });
      $('<div class="text-fill">'+ text +'</div>').insertAfter($dropdown.find('.text'));
  
      if (!$(this).find('p').length) return;
      var $message = $('<div class="ui message"></div>');
      $(this).find('p').appendTo($message);
      $(this).append($message)
    });
    
  
    window.gon.license_locales = {
      score: "评分",
      popular_used: "流行并广泛使用",
      licence_type: "许可协议类型",
      jurisdiction: "司法管辖区",
      grants_patent_rights: "授予专利权",
      patent_retaliation_clause: "专利报复条款",
      specifies_enhanced_attribution: "指定“增强型归属”",
      addresses_privacy_loophole: "解决“隐私漏洞”",
      includes_no_promotion_feature: "指定“不推广”功能",
      copyleft: "著佐权",
      permissive: "获准",
      specified: "规定",
      not_specified: "未规定",
      yes: "是",
      no: "否",
      do_not_care: "不在乎",
      select_2b_1: "强著佐权 （Copyleft）",
      select_2b_2: "弱著佐权 （Copyleft）",
      select_2c_1: "模块级别",
      select_2c_2: "文件级别",
      select_2c_3: "库接口级别",
      new_york: "纽约州",
      view_license_details: "查看许可证详情",
      use_this_license: "使用该许可证",
      no_data: "无数据",
    }
    var licenseData;
    var $license = $('.license-selector').clone(true);
    var modal;
    var modals;
    var LicenceSelector;
    var isTwelveHundred;
    $('.license-selector').remove();
    
    var resize = function () {
      var $bodyWidth = $('body').width();
  
      if ($bodyWidth > 1200 && !isTwelveHundred) {
        LicenceSelector.displayLicences(4);
        isTwelveHundred = true;
      } else if ($bodyWidth <= 1200 && isTwelveHundred) {
        LicenceSelector.displayLicences(2);
        isTwelveHundred = false;
      }
    }
  
    var initLicence = function (options) {
      isTwelveHundred = $('body').width() > 1200;
      LicenceSelector = new initLicenceSelector({
        data: MX.XML.ToJSON(licenseData.documentElement).entry,
        complate: function (data) {
          options.complete(data, modal)
        },
        skip: options.skip
      });
  
      LicenceSelector.displayLicences(isTwelveHundred ? 4 : 2);
  
      $(window).on('resize', resize);
  
      modal.css('max-width', Math.min(Math.max($('body').width() * .8, 1240), 1550) + 'px');
      modal.find('.content').css('min-height', '');
      modals.css({'z-index': 9999, 'overflow': 'auto'});
      $license.find('.license-foreword').show();
      $license.closest('.license-modal').css('right', 'auto')
    }
  
    function bindShowModal(options) {
      options.el.on('click', function () {
        
        var noop = function (){};
        modal = new GiteeModalHelper().confirm('许可证向导', $license, noop, noop, {
          onHidden: function() {
            modal.remove();
            LicenceSelector && $(window).off('resize');
            modals.css({'z-index': '', 'overflow': ''});
          },
          useFlex: true,
          closable: false
        });
        modals = modal.closest('.ui.modals');
        modals.addClass('license-modal-wrap');
        modal.addClass('license-modal');
        modal.find('.actions').hide();
        $license.find('.license-container').hide();
        $license.closest('.license-modal').addClass('is-foreword').parent().addClass('is-foreword-modals');
  
        if (!licenseData) {
          modal.find('.content').css('min-height', '279px');
          $license.find('.ui.inverted.dimmer').addClass('active');
          $license.find('.license-foreword').hide();
  
          $.ajax({
            url: '/static/matrix.xml?1575295307255',
            dataType: "xml",
            success: function(data) {
              licenseData = data
              initLicence(options)
              $license.find('.ui.inverted.dimmer').removeClass('active');
              
            }
          });
        } else {
          initLicence(options)
        }
      })
    }
    window.bindShowModal = bindShowModal
  })()
</script>

<script>
  $('.git-project-desc-wrapper .ui.dropdown').dropdown();
  if (true) {
    gon.project_new_blob_path = "/data_code/coding/new/master"
    bindShowModal({
      el: $('.no-license .project-license__create'),
      complete: function(data, modal) {
        if (!data.haveNoChoice && !data.data) {
          Flash.show('请选择一项开源许可证')
        } else {
          location.href = gon.project_new_blob_path + '?license=' + data.data
        }
      },
      skip: function () {
        location.href = gon.project_new_blob_path + '?license'
      }
    });
  }
  
  $(".project-admin-action-box .reject").click(function() {
    var reason = $('[name=review-reject-reason]').val();
    if (!reason) {
      Flash.error('请选择不通过理由')
      return
    }
    $.ajax({
      type: 'POST',
      url: "/admin/shumei_content/shumei_check/reject_project_public",
      data: {
        reason: reason,
        status: 'rejected',
        project_id: 39696681
      },
      success: function(result){
        if(result.status == 'success'){
          window.location.reload();
        }else{
          Flash.error(result.message)
        }
      }
    })
  })
  
  $(".project-admin-action-box .approve").click(function(){
  
    $.ajax({
      type: 'POST',
      url: "/admin/shumei_content/shumei_check/reject_project_public",
      data: {
        status: 'approved',
        project_id: 39696681
      },
      success: function(result){
        if(result.status == 'success'){
          window.location.reload();
        }else{
          Flash.error(result.message)
        }
      }
    })
  })
  
  $(".project-admin-action-box .waiting").click(function(){
  
    $.ajax({
      type: 'POST',
      url: "/admin/shumei_content/shumei_check/reject_project_public",
      data: {
        status: 'waiting',
        project_id: 39696681
      },
      success: function(result){
        if(result.status == 'success'){
          window.location.reload();
        }else{
          Flash.error(result.message)
        }
      }
    })
  })
  
  $('i.help.circle.icon').popup({
    popup: '.no-license .ui.popup',
    position: 'right center'
  });
  
  $('#remove-no-license-message').on('click', function() {
    $.cookie("skip_repo_no_license_message_39696681", 'hide', { expires: 365 });
    $('#user-no-license-message').hide();
    return;
  });
</script>
</div>

<div class='git-project-bread' id='git-project-bread'>
<div class='ui horizontal list mr-1' id='git-branch-dropdown' style=''>
<div class='item git-project-branch-item'>
<input type="hidden" name="path" id="path" value="" />
<div class='ui top left pointing dropdown gradient button dropdown-has-tabs' id='git-project-branch'>
<input type="hidden" name="ref" id="ref" value="master" />
<div class='default text'>
master
</div>
<i class='dropdown icon'></i>
<div class='menu'>
<div class='ui left icon input'>
<i class='iconfont icon-search dropdown-search-icon'></i>
<input class='search-branch' placeholder='搜索分支' type='text'>
</div>
<div class='tab-menu project-branch-tab-menu d-flex'>
<div class='tab-menu-item' data-placeholder='搜索分支' data-tab='branches'>
分支 (1)
</div>
<div class='d-align-center' style='flex:1;justify-content:end;'>
<div class='tab-menu-action' data-tab='branches'>
<a class="ui link button" href="/data_code/coding/branches">管理</a>
</div>
<div class='tab-menu-action' data-tab='tags'>
<a class="ui link button" href="/data_code/coding/tags">管理</a>
</div>
<div class='tab-menu-action-other ml-1'>
<a class="ui link button" href="/data_code/coding/branches#create-branch-modal">新建分支</a>
</div>
</div>
</div>
<div class='tab scrolling menu' data-tab='branches' id='branches_panel'>
<div data-value="master" class="item" title="master"><span>master</span></div>
</div>
</div>
</div>
<style>
  .iconfont.icon-shieldlock {
    color: #8c92a4;
  }
  .dropdown-search-icon {
    position: absolute;
    top: 8px;
    left: 11px;
  }
</style>
<style>
  #git-project-branch .project-branch-tab-menu, .project-branch-item .project-branch-tab-menu {
    padding-left: 0px !important;
    padding-right: 0px !important;
    margin: 0 11px !important;
    border-bottom: 1px solid #dfe3e9 !important; }
  #git-project-branch .ui.dropdown .menu, .project-branch-item .ui.dropdown .menu {
    width: 360px !important; }
    #git-project-branch .ui.dropdown .menu .item, .project-branch-item .ui.dropdown .menu .item {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap; }
  #git-project-branch .tab-menu-actions, .project-branch-item .tab-menu-actions {
    position: absolute;
    right: 0px !important;
    bottom: 0.357em; }
  #git-project-branch .tab-menu-action, .project-branch-item .tab-menu-action {
    position: relative !important;
    right: 0px !important;
    bottom: 0px !important; }
  #git-project-branch .menu::after, .project-branch-item .menu::after {
    display: none !important; }
</style>
<script>
  var $branchesDropdown = $('#branches_panel');
  var $tagsDropdown = $('#tags_panel');
  var $searchNameInput = $('.search-branch');
  var concurrentRequestLock = false;
  var filterXSS = window.filterXSS;
  var search_text = "";
  var branch_page_number = 1;
  var branch_total_pager = Math.ceil(1 / 20) || 1
  
  var flag_is_loading = false;
  var flag_page_number = 1;
  var flag_total_pager = Math.ceil(0 / 20) || 1
  
  $branchesDropdown.scroll(function() {
    var branchesPanel = document.getElementById('branches_panel');
    var numOfBranches = $branchesDropdown.children().length;
    if (branchesPanel.clientHeight + branchesPanel.scrollTop + 37 > branchesPanel.scrollHeight && numOfBranches < 1) {
      debounceLoadMoreBranches.call();
    }
  });
  function resetFlagVal() {
    flag_is_loading = false;
    flag_page_number = 1;
    flag_total_pager = 1;
  
    concurrentRequestLock = false
    search_text = "";
    branch_page_number = 1;
    branch_total_pager = 1
  }
  $searchNameInput.on('input', window.globalUtils.debouce(function (e) {
    resetFlagVal()
    var $currentTab = $('.tab-menu-action.active');
    var numOfBranches = $branchesDropdown.children().length;
    var searchWord = $searchNameInput.val().trim();
    search_text = searchWord
    if($currentTab.data('tab') === 'branches') {
      if (searchWord !== "") {
        loadData(searchWord,1);
      } else {
        loadData();
      }
    }
    var numOfTags = $tagsDropdown.children().length;
    if($currentTab.data('tab') === 'tags') {
      if (searchWord !== "") {
        fetchTags(searchWord,1);
      } else {
        fetchTags();
      }
    }
  }, 500));
  
  function toggleNoResultView($popPanel) {
    let no_data_html= `<div class='mt-1 mb-1 d-flex-center'> <span>暂无数据</span> </div>`
    $popPanel.append(no_data_html)
  }
  var debounceLoadMoreBranches = window.globalUtils.debouce(function () {
    if (concurrentRequestLock) return;
    branch_page_number += 1;
    if (branch_page_number > branch_total_pager) return;
    loadData(search_text, branch_page_number);
  }, 350);
  
  function loadData(search, page) {
    if (concurrentRequestLock) { return; }
    concurrentRequestLock = true;
  
    var searchParams = search || "";
    var pageParams = page || 1;
    $.ajax({
      url: "/" + gon.user_project + "/branches/names.json",
      type: 'GET',
      data: {
        search: searchParams,
        page: pageParams,
      },
      dataType: 'json',
      success: function (data) {
        branch_total_pager = data.total_pages;
        var html = '';
  
        if (pageParams === 1) {
          $branchesDropdown.empty();
        }
        data.branches.forEach(function (branch) {
          var protectRule = '';
          var branchName = filterXSS(branch.name);
          if(branch.branch_type.value === 1) {
            var rule = filterXSS(branch.protection_rule.wildcard);
            protectRule = `<i
                class="iconfont icon-shieldlock protected-branch-popup"
                data-title="受保护分支"
                data-content='保护规则： ${rule}'
              >
              </i>`
          }
          html += `<div data-value='${branchName}' class="item">
                    <span>${branchName}</span> ${protectRule}
                    </div>`
        });
        $branchesDropdown.append(html);
        $('.protected-branch-popup').popup()
        if (pageParams === 1 && data.count === 0) {
          toggleNoResultView($branchesDropdown);
        }
      },
      complete: function () {
        concurrentRequestLock = false;
      }
    });
  }
  
  
  
  $tagsDropdown.scroll(function() {
    var tagsPanel = document.getElementById('tags_panel');
    var numOfTags = $tagsDropdown.children().length;
    if (tagsPanel.clientHeight + tagsPanel.scrollTop + 37 > tagsPanel.scrollHeight && numOfTags < 0) {
      debounceLoadMore.call();
    }
  });
  var debounceLoadMore = window.globalUtils.debouce(function () {
    if (flag_is_loading) return;
    flag_page_number += 1;
    if (flag_page_number > flag_total_pager) return;
    fetchTags(search_text, flag_page_number);
  }, 350);
  
  function fetchTags(search, page) {
    var searchParams = search || "";
    var pageParams = page || 1;
  
    if (flag_is_loading) return;
    flag_is_loading = true;
  
    $.ajax({
      url: "/" + gon.user_project + "/tags/names.json",
      data: {
        search: searchParams,
        page: pageParams,
      },
      type: "GET",
      xhrFields: {
        withCredentials: true,
      },
      success: function (data) {
        flag_total_pager = data.total_pages;
        if (pageParams === 1) {
          $tagsDropdown.html('');
        }
        data.tags.forEach((tag) => {
          const itemDiv = document.createElement('div');
          itemDiv.classList.add('item');
          itemDiv.setAttribute('data-value', tag.name);
          itemDiv.innerText = window.filterXSS(tag.name);
          $tagsDropdown.append(itemDiv)
        });
        if (pageParams === 1 && data.count === 0) {
          toggleNoResultView($tagsDropdown);
        }
      },
      error: function () {
      },
      complete: function () {
        flag_is_loading = false;
      },
    });
  }
  $('.project-branch-tab-menu').on('click','.tab-menu-item', function (e) {
    var $currentTab = $(this).data('tab')
    if($currentTab === 'branches') {
      $searchNameInput.val('')
      search_text = '';
      loadData()
    }
    if($currentTab === 'tags') {
      $searchNameInput.val('')
      search_text = '';
      fetchTags();
    }
  })
</script>

<script>
  $(function () {
    var curNode = $('.git-project-branch-item')
    if (false ){
      curNode = $('.left-project-branch-item')
    }else {
      curNode = $('.git-project-branch-item')
    }
    Gitee.initTabsInDropdown(curNode.find('#git-project-branch').dropdown({
      fullTextSearch: true,
      selectOnKeydown: false,
      direction: 'downward',
      action: function (text,value,el) {
        var oItemOrInitObject = el[0] || el
        var isNotSelect = oItemOrInitObject.dataset.tab && oItemOrInitObject.dataset.tab === 'branches'
        if(isNotSelect){
          console.warn("You didn't choose a branch")
          return
        }
        var path = $('#path').val();
        var href = ['/data_code/coding/tree', encodeURIComponent(value), path].join('/');
        window.location.href = href;
        return true
      },
      onNoResults: function (searchTerm) {
        //未找到结果
        return true
      },
    }));
    $('.protected-branch-popup').popup()
  })
</script>

</div>
</div>
<div class='git-project-right-actions pull-right'>
<div class='ui orange button' id='btn-dl-or-clone'>
克隆/下载
<i class='dropdown icon'></i>
</div>
<div class='ui small modal' id='git-project-download-panel'>
<i class='iconfont icon-close close'></i>
<div class='header'>
克隆/下载
</div>
<div class='content'>
<div class='ui secondary pointing menu mb-2 menu-container'>
<a class='item active' data-text='' data-type='http' data-url='https://gitee.com/data_code/coding.git'>HTTPS</a>
<a class='item' data-text='' data-type='ssh' data-url='git@gitee.com:data_code/coding.git'>SSH</a>
<a class='item' data-text="该仓库未启用SVN访问，请仓库管理员前往【&lt;a target='_blank' href=/data_code/coding/settings#function&gt;仓库设置&lt;/a&gt;】开启。" data-type='svn' data-url=''>SVN</a>
<a class='item' data-text="该仓库未启用SVN访问，请仓库管理员前往【&lt;a target='_blank' href=/data_code/coding/settings#function&gt;仓库设置&lt;/a&gt;】开启。" data-type='svn_ssh' data-url=''>SVN+SSH</a>
<a class="button-box ui basic orange button" href="/data_code/coding/repository/archive/master.zip"><i class='icon download'></i>
下载ZIP
</a></div>
<div class='ui fluid right labeled small input download-url-panel mb-2'>
<input type="text" name="project_url_clone" id="project_url_clone" value="https://gitee.com/data_code/coding.git" onclick="focus();select()" readonly="readonly" />
<div class='ui basic label copy-icon-box'>
<i class='icon iconfont icon-clone mr-0 btn-copy-clone' data-clipboard-target='#project_url_clone' id='btn-copy-project_clone_url1'></i>
</div>
</div>
<div class='tip-box mb-2'>
提示
</div>
<div class='mb-1 clone-url-title'>
下载代码请复制以下命令到终端执行
</div>
<div class='ui fluid right labeled small input download-url-panel mb-2'>
<input type="text" name="project_clone_url" id="project_clone_url" value="https://gitee.com/data_code/coding.git" onclick="focus();select()" readonly="readonly" />
<div class='ui basic label copy-icon-box'>
<i class='icon iconfont icon-clone mr-0 btn-copy-clone' data-clipboard-target='#project_clone_url' id='btn-copy-project_clone_url'></i>
</div>
</div>
<div class='ui fluid right labeled warning-text forbid-warning-text'>

</div>
<div class='http-ssh-item mb-2'>
<div>
为确保你提交的代码身份被 Gitee 正确识别，请执行以下命令完成配置
</div>
<div class='textarea-box mt-2'>
<textarea class='textarea-content-box' id='global-config-clone' readonly>git config --global user.name '我也不曾来过' &#10git config --global user.email '1139446336@qq.com'</textarea>
<i class='icon iconfont icon-clone mr-2 btn-copy-clone text-dark' data-clipboard-target='#global-config-clone' id='btn-copy-global-config'></i>
</div>
</div>
<div class='ssh-item item-panel-box'>
<div class='mb-2'>
初次使用 SSH 协议进行代码克隆、推送等操作时，需按下述提示完成 SSH 配置
</div>
<div class='mb-1'>
<span>1</span>
生成 RSA 密钥
</div>
<div class='ui fluid right labeled small input mb-2'>
<input type="text" name="ssh_keygen_clone" id="ssh_keygen_clone" value="ssh-keygen -t rsa" onclick="focus();select()" readonly="readonly" />
<div class='ui basic label copy-icon-box'>
<i class='icon iconfont icon-clone mr-0 btn-copy-clone' data-clipboard-target='#ssh_keygen_clone' id='btn-copy-ssh_keygen'></i>
</div>
</div>
<div class='mb-1'>
<span>2</span>
获取 RSA 公钥内容，并配置到<a href='/profile/sshkeys' target="_blank"> SSH公钥 </a> 中
</div>
<div class='ui fluid right labeled small input mb-2'>
<input type="text" name="id_rsa_clone" id="id_rsa_clone" value="cat ~/.ssh/id_rsa.pub" onclick="focus();select()" readonly="readonly" />
<div class='ui basic label copy-icon-box'>
<i class='icon iconfont icon-clone mr-0 btn-copy-clone' data-clipboard-target='#id_rsa_clone' id='btn-copy-d_rsa'></i>
</div>
</div>
</div>
<div class='svn-item item-panel-box'>
<div class='mb-1 mt-2'>
在 Gitee 上使用 SVN，请访问<a href='https://help.gitee.com/enterprise/code-manage/%E4%BB%A3%E7%A0%81%E6%89%98%E7%AE%A1/%E4%BB%A3%E7%A0%81%E4%BB%93%E5%BA%93/Gitee%20SVN%E6%94%AF%E6%8C%81' target="_blank"> 使用指南 </a>
</div>
</div>
<div class='http-item item-panel-box'>
<div class='mb-2 mt-2'>
使用 HTTPS 协议时，命令行会出现如下账号密码验证步骤。基于安全考虑，Gitee 建议<a href='/profile/personal_access_tokens' target="_blank"> 配置并使用私人令牌 </a>替代登录密码进行克隆、推送等操作
</div>
<div>
Username for 'https://gitee.com': data_code
</div>
<div class='mb-1'>
<span>
Password for 'https://data_code@gitee.com':
</span>
<span>
私人令牌
</span>
</div>
</div>
</div>
</div>
<style>
  #git-project-download-panel {
    top: 90px !important; }
    #git-project-download-panel input {
      color: #40485b !important; }
    #git-project-download-panel .textarea-box {
      width: 100%;
      height: 60px;
      color: #9d9d9d;
      border-radius: 2px;
      background-color: #F5F5F5 !important;
      display: -webkit-box;
      display: -ms-flexbox;
      display: flex;
      -webkit-box-align: center;
          -ms-flex-align: center;
              align-items: center; }
    #git-project-download-panel .menu-container {
      font-weight: bold;
      border-color: rgba(0, 0, 0, 0.1) !important;
      border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important; }
      #git-project-download-panel .menu-container .item {
        padding: 7px 12px !important; }
    #git-project-download-panel .hr-item {
      color: rgba(39, 41, 43, 0.15) !important; }
    #git-project-download-panel .textarea-content-box {
      width: 100%;
      height: 60px;
      resize: none;
      border: 0px !important;
      background-color: #F5F5F5 !important;
      color: #40485b !important; }
    #git-project-download-panel .btn-copy-clone {
      cursor: pointer;
      color: rgba(0, 0, 0, 0.87) !important; }
    #git-project-download-panel .copy-icon-box {
      background-color: #F5F5F5 !important;
      border-left: 0px !important; }
    #git-project-download-panel .button-box {
      border: 0px !important;
      float: right !important;
      padding-right: 0 !important; }
    #git-project-download-panel .tip-box {
      border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
      padding-bottom: 4px;
      font-weight: 700; }
    #git-project-download-panel .popup-container {
      padding: 8px 12px 4px 12px;
      text-align: center;
      font-size: 14px; }
      #git-project-download-panel .popup-container .ok {
        margin: 12px auto;
        width: 25%;
        min-width: 125px;
        display: block; }
      #git-project-download-panel .popup-container .cancel {
        margin-left: 0; }
</style>
<script>
  $(function () {
    var $btnClone = $('#btn-dl-or-clone')
    var $modalDownload = $('#git-project-download-panel');
    var $input = $('#project_clone_url')
    var $inputUrl = $('#project_url_clone')
    var cloneUrlTitle= $('.clone-url-title')
  
    $('#btn-dl-or-clone').on('click', function (e) {
      e.preventDefault();
      $modalDownload.modal('show');
    })
  
    $modalDownload.find('.menu > .item').on('click', function(e) {
      var $item = $(this).addClass('active');
      $item.siblings().removeClass('active');
      var dataUrl = $item.attr('data-url');
      var cloneUrl = $item.attr('data-url');
      var dataType = $item.attr('data-type')
      var cloneToLocal = '下载代码请复制以下命令到终端执行'
      if(dataType=='http'){
        $modalDownload.find('.http-item').show();
        $('.content > .item-panel-box:not(.http-item)').hide();
        $modalDownload.find('.http-ssh-item').show();
        cloneUrl = 'git clone '+dataUrl
      }else if(dataType=='ssh'){
        $modalDownload.find('.ssh-item').show();
        $('.content > .item-panel-box:not(.ssh-item)').hide();
        $modalDownload.find('.http-ssh-item').show();
        cloneUrl = 'git clone '+dataUrl
      }else if(dataType=='svn') {
        $('.content > .item-panel-box:not(.svn-item)').hide();
        $modalDownload.find('.svn-item').show();
        $modalDownload.find('.http-ssh-item').hide();
        cloneUrl = 'svn checkout '+dataUrl
      }else {
        $('.content > .item-panel-box:not(.svn-item)').hide();
        $modalDownload.find('.svn-item').show();
        $modalDownload.find('.http-ssh-item').hide();
        cloneUrl = 'svn checkout '+dataUrl
      }
      if (dataUrl) {
        $modalDownload.find('.download-url-panel').show();
        $input.val(cloneUrl);
        $inputUrl.val(dataUrl)
        cloneUrlTitle.show();
        $modalDownload.find('.forbid-warning-text').html('');
      } else {
        $modalDownload.find('.download-url-panel').hide();
        //$modalDownload.find('.svn-item').hide();
        cloneUrlTitle.hide();
        $modalDownload.find('.forbid-warning-text').html($item.attr('data-text') || '');
      }
      $.cookie('remote_way', $item.attr('data-type'), { expires: 365, path: '/' });
    }).filter('[data-type="' + ($.cookie('remote_way') || 'http') + '"]').trigger('click');
  
    $('.btn-copy-clone').popup({
      content: '点击复制',
    }).on('click', function(e) {
      e.stopPropagation();
      return false;
    }).each(function(_, btnCopy) {
      var $btnCopy = $(btnCopy);
      new Clipboard(btnCopy).on('success', function() {
        $btnCopy.popup('destroy').popup({
          content: '已复制',
          on: 'manual'
        }).popup('show');
        setTimeout(function() {
          $btnCopy.popup('destroy').popup({
            content: '点击复制'
          });
        }, 2000);
      });
    });
    var $downloadBtn= $('.unlogin-download-btn')
    var $popupContainer = $('.popup-container')
    $downloadBtn.popup({
      popup : $('.custom.popup'),
      position   : 'bottom right',
    }).on('click', function(e) {
      $downloadBtn.popup('destroy').popup({
        popup : $('.custom.popup'),
        on: 'manual',
        position   : 'bottom right',
      }).popup('show');
      setTimeout(function() {
        $downloadBtn.popup('hide');
      }, 2000);
  
    })
  })
</script>

</div>
<div class='d-inline pull-right' id='git-project-root-actions'>
<div class='ui horizontal list repo-action-list d-flex d-align-center repo-action-list-right'>
<div class='item search-box-container'>
<div class='ui icon input search-input' id='search-box'>
<input class='search-file-name' maxlength='40' placeholder='搜索文件' type='text'>
</div>
<a class='d-flex d-align-center head-search-file-btn' id='search-file-btn'>
<span class='iconify' data-icon='gitee:search' style='font-size: 16px;color:#979CAC;margin-right:10px'></span>
</a>
<div class='filter-file-container' style='display: none;'></div>
</div>
<div class='item plus-box'>
<div class='ui pointing right top dropdown git-project-file' id='git-project-file'>
<span class='iconify' data-icon='gitee:plus' style='font-size: 16px;color:#979CAC'></span>
<div class='menu repo-dropdown-box pt-1 pb-1'>
<a class="item repo-action d-flex d-align-center" href="/data_code/coding/pull/new/data_code:master...data_code:master?source_repo=39696681"><span class='iconify' data-icon='gitee:pr' style='font-size: 16px;color:#979CAC;margin-right:12px'></span>
<span>新建 Pull Request</span>
</a><a class="item repo-action d-flex d-align-center" href="/data_code/coding/issues/new/choose"><span class='iconify' data-icon='gitee:task' style='font-size: 16px;color:#979CAC;margin-right:12px'></span>
<span>新建 Issue</span>
</a><div class='mt-1 mb-1 hr-box'></div>
<a title="新建文件" id="new_file_bread" class="item repo-action d-flex d-align-center" href="/data_code/coding/new/master"><span class='iconify' data-icon='gitee:file' style='font-size: 16px;color:#979CAC;margin-right:12px'></span>
<span>
新建文件
</span>
</a><a title="新建 Diagram 文件" class="item repo-action d-flex d-align-center" href="/data_code/coding/new/master?ext=drawio"><span class='iconify' data-icon='gitee:lan' style='font-size: 16px;color:#979CAC;margin-right:12px'></span>
<span>
新建 Diagram 文件
</span>
</a><a class='create-folder item repo-action d-flex d-align-center' id='create-folder'>
<span class='iconify' data-icon='gitee:folder' style='font-size: 16px;color:#979CAC;margin-right:12px'></span>
<span>新建文件夹</span>
</a>
<a title="" id="new_submodule" class="item repo-action d-flex d-align-center" href="/data_code/coding/new_submodule/master"><span class='iconify' data-icon='gitee:folder-sub' style='font-size: 16px;color:#979CAC;margin-right:12px'></span>
<span>
新建子模块
</span>
</a><a title="上传文件" id="upload_file_bread" class="item repo-action d-flex d-align-center" href="/data_code/coding/upload/master"><span class='iconify' data-icon='gitee:upload' style='font-size: 16px;color:#979CAC;margin-right:12px'></span>
<span>
上传文件
</span>
</a></div>
</div>
</div>
<div class='item toschina-content__hidden webIDE-box' data-content='Web IDE'>
<a class="ui d-flex d-align-center webide" target="_blank" href="/-/ide/project/data_code/coding/edit/master/-/"><span class='iconify' data-icon='gitee:computer' style='font-size: 16px;color:#979CAC;margin-right:12px'></span>
</a></div>
</div>
<script>
  $('.git-project-file').dropdown({
    action: 'hide',
    onHide: function () {
      $('.plus-box').removeClass('click-active')
    },
    onShow: function () {
      $('.plus-box').addClass('click-active')
    }
  });
</script>
<script>
  $('.webIDE-box').popup()
</script>
<script src="https://cn-assets.gitee.com/assets/file_search/app-89100712b3bd4fbc0b0eb0aa7d7bf62e.js"></script>
<style>
  .filter-file-container-hide {
    display: none !important; }
</style>

</div>
<div class='breadcrumb_path path-breadcrumb-contrainer' id='git-project-breadcrumb'>

</div>
<div class='ui horizontal list repo-action-list branches-tags' style=''>
<div class='item'>
<a class="ui blank button" href="/data_code/coding/branches"><i class='iconfont icon-branches'></i>
分支 1
</a></div>
<div class='item mr-3'>
<a class="ui blank button" href="/data_code/coding/tags"><i class='iconfont icon-tag'></i>
标签 0
</a></div>
</div>
</div>
<script src="https://cn-assets.gitee.com/webpacks/parse_blob_form_scheme-ea7503b4330a77e025e6.bundle.js"></script>
<script>
  if(window.gon.locale == 'en')
    $('.branches-tags').css('margin-top', '12px')
   // 仓库页面切换路径时: 刷新 yaml 错误检查
  $(window).on('pjax-complete:file-show', function () {
    window.parseBlobFormScheme && window.parseBlobFormScheme($('.js-blob-data').data('blob'));
  });
</script>

<style>
  .ui.dropdown .menu > .header {
    text-transform: none; }
</style>
<script>
  $(function () {
    var $tip = $('#apk-download-tip');
    if (!$tip.length) {
      return;
    }
    $tip.find('.btn-close').on('click', function () {
      $tip.hide();
    });
  });
  (function(){
    function pathAutoRender() {
      var $parent = $('#git-project-bread'),
          $child = $('#git-project-bread').children('.ui.horizontal.list'),
          mainWidth = 0;
      $child.each(function (i,item) {
        mainWidth += $(item).width()
      });
      $('.breadcrumb.path.fork-path').remove();
      if (mainWidth > 995) {
        $('#path-breadcrumb').hide();
        $parent.append('<div class="ui breadcrumb path fork-path">' + $('#path-breadcrumb').html() + '<div/>')
      } else {
        $('#path-breadcrumb').show();
      }
    }
    window.pathAutoRender = pathAutoRender;
    pathAutoRender();
  })();
</script>

<div class='branch-diff-notice-bar hide'>
<div class='left-section'></div>
<div class='right-section'>
<div class='ui button gradient contribute'>
贡献代码
<i class='dropdown icon'></i>
</div>
<div class='ui button gradient branch-sync hide'>
同步代码
<i class='dropdown icon'></i>
</div>
</div>
</div>
<div class='ui popup contribute branch-diff-pop-panel contribute-pop'>
<div class='notice-title'></div>
<div class='notice-sub-title'></div>
<div class='notice-content'></div>
<a class='ui button orange fluid disabled create-pr' href='/' target='_blank'>
创建 Pull Request
</a>
</div>
<div class='ui popup branch-diff-pop-panel branch-sync-pop'>
<div class='notice-title'></div>
<div class='notice-content'></div>
<div class='known-more'>
<a href='/help/articles/4395' target='_blank'>
了解更多
</a>
</div>
<div class='btn-group'>
<div class='ui button basic red discard-btn hide'></div>
<a class='ui button orange basic diff-btn hide' href='/' target='_blank'>
对比差异
</a>
<a class='ui button gradient pr-sync-btn hide' href='/' target='_blank'>
通过 Pull Request 同步
</a>
<div class='ui buttons basic dropdown-group-btn hide'>
<div class='ui button branch-sync-btn'>
同步更新到分支
</div>
<div class='ui button dropdown dropdown-create-pr'>
<i class='icon dropdown'></i>
<div class='menu'>
<div class='disabled item'>
<div>
通过 Pull Request 同步
<div class='text-muted fs-12 mt-1'>
将会在向当前分支创建一个 Pull <br/>Request，合入后将完成同步
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
  (function () {
    const i18_compare_current_branch = `当前分支与 <a href="URL">BRANCH</a> 相比`
    const i18_branch_ahead_commit = `，领先 <a href="URL">NUM 个 Commit</a>`
    const i18_branch_behind_commit = `，落后 <a href="URL">NUM 个 Commit</a>`
  
    const i18_contribute_ahead_title = `当前分支比 BRANCH 领先了 NUM 次提交。`
    const i18_contribute_pr_create = `创建一个 Pull Request 贡献代码。`
    const i18_contribute_has_pr = `已创建了 Pull Request`
    const i18_contribute_no_ahead = `这个分支没有领先于 BRANCH 的代码提交。`
  
    const i18_branch_sync_behind  = `这个分支已落后于 BRANCH 分支`
    const i18_branch_sync_behind_desc = `从 BRANCH 分支同步 NUM 个提交来更新分支以保持当前分支代码是最新的。`
    const i18_branch_sync_out_of_date = `此分支已过时`
    const i18_branch_sync_out_of_date_desc = `你可以将 BRANCH 分支中的最新更改合并到此分支中。或丢弃当前分支上的提交以使当前分支与 BRANCH 分支匹配。这将从当前分支中删除 NUM 个提交。`
    const i18_branch_discard_diff = `丢弃 NUM 个提交`
  
    const i18_branch_sync_success = `同步成功`
    const i18_branch_sync_fail = `同步失败`
    const i18_branch_discard_success = `丢弃成功`
    const i18_branch_discard_fail = `丢弃失败`
  
    window.locale_temple_branch_diff = {
      i18_compare_current_branch,
      i18_branch_ahead_commit,
      i18_branch_behind_commit,
  
      i18_contribute_ahead_title,
      i18_contribute_pr_create,
      i18_contribute_has_pr,
      i18_contribute_no_ahead,
  
      i18_branch_sync_behind,
      i18_branch_sync_behind_desc,
      i18_branch_sync_out_of_date,
      i18_branch_sync_out_of_date_desc,
      i18_branch_discard_diff,
  
      i18_branch_sync_success,
      i18_branch_sync_fail,
      i18_branch_discard_success,
      i18_branch_discard_fail
    }
  })();
</script>

<div class='row column tree-holder' id='tree-holder'>
<div class='tree-content-holder' id='tree-content-holder'>
<div class='ui flat nopadding segment tree-content'>
<div class='git-project-recent-commit' id='git-project-info'>
<div class='recent-commit'>
<a class="commit-author-link  js-popover-card " data-username="data_code" href="/data_code"><img class="avatar circular ui image 20 mini" width="20" alt="" avatar="我也不曾来过-data_code" /> <span class="commit-author-name">我也不曾来过</span></a>
<span>
<a class="repo-index-commit-msg" title="删除文件 test.txt" href="/data_code/coding/commit/a1de5c996e0b221f42cbbb429a52b9cd884ed3c6">删除文件 test.txt</a>
</span>
<span>a1de5c9</span>
<span class='timeago' datetime='2025-02-18 07:27' title='2025-02-18 07:27:25 +0000'></span>
<check-runs branch='master' commit-id='a1de5c996e0b221f42cbbb429a52b9cd884ed3c6' project-path='data_code/coding'></check-runs>
<build-status commit-id='a1de5c996e0b221f42cbbb429a52b9cd884ed3c6'></build-status>
</div>
<div class='all-commits'>
<a href="/data_code/coding/commits/master"><i class='iconfont icon-commit'></i>
4 次提交
</a></div>
</div>

<div class='grid list selection table_da39a3ee5e6b4b0d3255bfef95601890afd80709 tree-table ui' id='tree-slider'>
<div class='create-folder-form form ui'>
<form id="folder_form-edit" action="/data_code/coding/new/master" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="OzNqhb3LEGSu2DxlCB1A1lYPXHWHaN4m3XwPjOjzhEbLDczGaHDlS9Dr7ZM+8aJZelQSmM21uF7hebP9Xt8/KQ==" />
<div class='fields'>
<div class='field'>
<input type="hidden" name="new_file_path" id="new_file_path" />
<input type="hidden" name="content" id="content" />
<input id='new_folder_path' name='new_folder_path' placeholder='新建文件夹' type='text'>
</div>
<div class='field'>
<button name="button" type="submit" class="ui primary button orange submit field-init-btn js-submit-btn">提交</button>
<a class="ui basic white button cancel field-init-btn" href="javascript:void(0)">取消</a>
</div>
<div class='ui mid-center small message notice'>
<strong>提示:</strong>
由于 Git 不支持空文件夾，创建文件夹后会生成空的 .keep 文件
</div>
</div>
</form>

</div>
<div class='file_8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d row tree-item' data-branch='master' data-type='file' file_hex='file_8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d'>
<div class='five wide column tree-item-file-name tree-list-item d-align-center' data-path='README.md' data-type='file'>
<i class="iconfont icon-file"></i>
<a class="tree-folder-item" title="README.md" data-path="README.md" href="/data_code/coding/blob/master/README.md">README.md</a>
<div class='js-tree-row-lfs'></div>
</div>
<div class='js-tree-row-commit'></div>
</div>
<div class='rename-file_8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d row tree-item tree-item-rename' file_hex='file_8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d' style='display:none'>
<div class='ui column form' path='blob/master/README.md'>
<div class='two fields'>
<div class='five wide field'>
<input class='ui input' name='new_filename' type='text' value='README.md'>
</div>
<div class='five wide field'>
<button class='ui blue button popup-save' type='submit'>保存</button>
<button class='ui basic button popup-close'>取消</button>
</div>
</div>
</div>
</div>
<div class='file_a17c9aaa61e80a1bf71d0d850af4e5baa9800bbd row tree-item' data-branch='master' data-type='file' file_hex='file_a17c9aaa61e80a1bf71d0d850af4e5baa9800bbd'>
<div class='five wide column tree-item-file-name tree-list-item d-align-center' data-path='data' data-type='file'>
<i class="iconfont icon-file"></i>
<a class="tree-folder-item" title="data" data-path="data" href="/data_code/coding/blob/master/data">data</a>
<div class='js-tree-row-lfs'></div>
</div>
<div class='js-tree-row-commit'></div>
</div>
<div class='rename-file_a17c9aaa61e80a1bf71d0d850af4e5baa9800bbd row tree-item tree-item-rename' file_hex='file_a17c9aaa61e80a1bf71d0d850af4e5baa9800bbd' style='display:none'>
<div class='ui column form' path='blob/master/data'>
<div class='two fields'>
<div class='five wide field'>
<input class='ui input' name='new_filename' type='text' value='data'>
</div>
<div class='five wide field'>
<button class='ui blue button popup-save' type='submit'>保存</button>
<button class='ui basic button popup-close'>取消</button>
</div>
</div>
</div>
</div>

</div>

</div>
<div class='ui tree_progress' data-logs-path='/data_code/coding/refs/master/logs_tree/'>
<div class='ui active inverted dimmer'>
<div class='ui small text loader'>Loading...</div>
</div>
</div>
<div class='readme-box' id='git-readme'>
<div class='ui flat nopadding segment file_holder'>
<div class='file_title d-flex-between file_readme_title'>
<div class='d-flex'>
<div class='file_title_readme mr-1 pb-1 active-title pr-1 pl-1'>
<i class='iconfont icon-readme mr-05'></i>
<span class='file_name'>README</span>
</div>
</div>
<div>
<div class='readme-edit'>
<a class='text-muted edit_path edit-blob' href='/data_code/coding/edit/master/README.md' title=''>
<i class='iconfont icon-edit mr-05'></i>
</a>
</div>
</div>
</div>
<div class='readme-content'>
<div class='file_catalog'>
<div class='toggle'>
<i class='icon angle left'></i>
</div>
<div class='scroll-container'>
<div class='container'>
<div class='skeleton'>
<div class='line line1'></div>
<div class='line line2'></div>
<div class='line line3'></div>
<div class='line line1'></div>
<div class='line line2'></div>
<div class='line line3'></div>
</div>
</div>
</div>
</div>
<div class='file_content markdown-body'>
</div>
<div class='file_line'></div>
</div>
<div class='hide lisence-content'>
<div class='file_content code'>
<p class='nothing_here_message'>空文件</p>
</div>
</div>
</div>
</div>
<script>
  "use strict";
  if ($('.markdown-body').children("style").length != 0) {
    var i, array = $('.markdown-body').children("style");
    array.first().attr('scoped','');
    $.scoped();
  }
  
  $('.appeal_message').removeClass('text-center')
  
  $(".file_title_readme").click(function(event) {
    $('.lisence-content').hide()
    $('.readme-content').show()
    $('.lisence-edit').hide()
    $('.readme-edit').show()
    $('.file_title_readme').addClass('active-title')
    $('.file_title_license').removeClass('active-title')
  });
  $(".file_title_license").click(function(event) {
    $('.lisence-content').show()
    $('.readme-content').hide()
    $('.lisence-edit').show()
    $('.readme-edit').hide()
    $('.file_title_license').addClass('active-title')
    $('.file_title_readme').removeClass('active-title')
  });
  try {
    if((gon.wait_fork!=undefined && gon.wait_fork==true) || (gon.wait_fetch!=undefined && gon.wait_fetch==true)){
      $('.edit-blob').popup({content:"当前仓库正在后台处理中,暂时无法编辑", on: 'hover', delay: { show: 200, hide: 200 }});
      $('.edit-blob').click(function(e){
        e.preventDefault();
      })
    }
  }catch (error) {}
  $('.disabled-edit-readonly').popup({
    content: "只读文件不可编辑",
    className: {
      popup: 'ui popup',
    },
    position: 'bottom center',
  })
  $('.disabled-edit-readonly, .disabled-edit-status').click(function() {
    return false
  })
  $('.has_tooltip').popup({
    position: 'top center'
  });
</script>
<style>
  .txt-style {
    background: #FFF !important;
    padding: 0 !important; }
  
  .file_readme_title {
    padding-bottom: 0 !important;
    cursor: pointer; }
  
  .active-title {
    border-bottom: 2px solid #fe7300; }
  
  .preformatted {
    font-family: monospace;
    word-wrap: break-word;
    white-space: pre-wrap;
    word-break: keep-all; }
  
  .disabled-edit-readonly,
  .has_tooltip {
    color: #40485b !important;
    cursor: default !important;
    opacity: 0.3 !important; }
</style>

</div>
<div class='project__footer-container'>
<div class='actions'>
<div class='item star-container'>
<div class='unstar'>
<a data-remote="true" rel="nofollow" data-method="post" href="/data_code/coding/unstar"><div class='circle'>
<i class='iconfont icon-star-solid'></i>
</div>
</a><a class="content" href="/data_code/coding/stargazers"><div class='title'>
Starred
</div>
<div class='desc action-social-count'>
0
</div>
</a></div>
<div class='star'>
<a data-remote="true" rel="nofollow" data-method="post" href="/data_code/coding/star"><div class='circle'>
<i class='iconfont icon-star'></i>
</div>
</a><a class="content" href="/data_code/coding/stargazers"><div class='title'>
Star
</div>
<div class='desc action-social-count'>
0
</div>
</a></div>
</div>
<div class='item fork-container'>
<a id="fork-btm-button" href="javascript: void(0);"><div class='circle'>
<i class='iconfont icon-fork'></i>
</div>
</a><a href="/data_code/coding/members"><div class='content'>
<div class='title'>
Fork
</div>
<div class='desc'>
0
</div>
</div>
</a></div>
<div class='item donate-container'>
<div class='circle'>
<i class='iconfont icon-donate'></i>
</div>
<div class='content'>
<div class='title'>捐赠</div>
<div class='desc'>
0 人次
</div>
</div>
</div>
</div>
</div>
<script>
  var $donateModal = $('.project-donate-modal');
  $('.donate-container').on('click', '.circle, .content', function () {
    $donateModal.modal('show');
  });
</script>

<script id='tree-item-context-menu-template' type='text/plain'>
<div class='ui menu compact vertical tree-context'>
<a class='btn-open-new-tab item tree-operation'>
<i class='file outline icon'></i>
新标签打开
</a>
<a class='btn-copy item tree-operation'>
<i class='copy icon'></i>
复制
</a>
<a class='btn-rename item tree-operation'>
<i class='edit icon'></i>
重命名
</a>
<a class='btn-delete item tree-operation'>
<i class='trash icon'></i>
删除
</a>
<a class='btn-readonly-is-uncharged-enterprise item tree-operation'>
<i class='icon lock'></i>
标记为只读
</a>
</div>
</script>
<script id='tree-item-submodule-context-menu-template' type='text/plain'>
<div class='ui menu compact vertical tree-context'>
<a class='btn-copy item tree-operation'>
<i class='copy icon'></i>
复制
</a>
<a class='btn-compact-edit item tree-operation submodule_item'>
<i class='edit icon'></i>
编辑
</a>
<a class='btn-submodule-delete item tree-operation submodule_item'>
<i class='trash icon'></i>
删除
</a>
</div>
</script>
<script src="/static/javascripts/file-icons.js"></script>
<script>
  $(function() {
    $(".tree-list-item").each(function(){
      $this = $(this)
      var path = $this.attr('data-path')
      var type = $this.attr('data-type')
      $icon = $this.find('i')
      if(type==='file'){
        let iconClass='';
        try {
          iconClass =
            FileIcons.getClassWithColor(path) || 'file-generic';
        } catch (err) {}
        if(iconClass)
          $icon.attr('class', "file-icon-item iconfont icon-file ".concat(iconClass));
      }
    })
    var $createFolderForm = $('.create-folder-form'),
        $createFolderSubmitBtn = $('.create-folder-form .js-submit-btn')
        $folderPath = $('#new_folder_path'),
        $message = $('.create-folder-form .notice'),
        folders = [],
        folderReg = new RegExp(/\/+/);
  
    var INDEX_BEGIN_WITH_READONLY_DIR = 0
    var gitGCModal = new GiteeModalHelper({
        approveText: "确认",
        cancelText: "取消",
        okText: "确认",
    })
    function checkFolder(folder) {
      var i, itemArr;
      if (folder == '') {
        return false;
      }
      for (i = 0; i< folders.length; i++) {
        itemArr = folders[i].split('/');
        if (itemArr[0] == folder){
          return true
        }
      }
      return false;
    }
    function createFolderShow () {
      $createFolderForm.show();
      $folderPath.focus();
    }
  
    $('.create-folder-form .cancel').click(function () {
      $createFolderForm.hide();
    })
  
    $folderPath.on('input', function (e) {
      if($(this).parent().hasClass('error')) {
        $message.removeClass('warn').html("<strong>提示:</strong> 由于 Git 不支持空文件夾，创建文件夹后会生成空的 .keep 文件");
        $(this).parent().removeClass('error');
      }
      $createFolderSubmitBtn.removeClass('disabled');
    })
  
    $createFolderForm.submit(function (e) {
      var value = $folderPath.val();
      if (!folderReg.test(value) && !checkFolder(value) && value) {
        $('#new_file_path').val(value + '/.keep');
      } else {
        $message.addClass('warn').html("文件夹名不为空，不含有字符（／）且不能与当前目录文件夹同名");
        $folderPath.parent().addClass('error');
        e.preventDefault();
      }
      $createFolderSubmitBtn.addClass('disabled');
    })
  
    $('.create-folder').click(createFolderShow)
    $('#create-folder').click(createFolderShow);
    window.createFolderShow = createFolderShow;
  
    window.hasTreeContextMenu = false;
    var contextMenuTemplate = $('#tree-item-context-menu-template').html();
    var submoduleContextMenuTemplate = $("#tree-item-submodule-context-menu-template").html();
    if ("true" == "false" || "true" == "false" || "true" == "false") {
      return;
    }
  
    function createContextMenu($item, x, y) {
      if (hasTreeContextMenu) {
        $('.tree-context').remove();
        hasTreeContextMenu = false;
        return;
      }
      hasTreeContextMenu = true;
      var isSubmodule = $item.hasClass('tree-item-submodule-name')
      var path = $item.parent().find('a').attr('href');
      var $menu = isSubmodule ? $(submoduleContextMenuTemplate).appendTo('body') : $(contextMenuTemplate).appendTo('body');
      var readonly = $item.attr('data-readonly') !== undefined
      var submoduleEditUrl = $item.closest('.tree-item').attr('edit_url')
      var submoduleDeleteUrl = $item.closest('.tree-item').attr('delete_url')
      var hasNormal = $item.closest('.tree-item')[0].hasAttribute('normal')
      if ($('.btn-readonly')[0]) {
        if (readonly) {
          $('.btn-readonly')[0].children[0].className = 'icon unlock'
          $('.btn-readonly')[0].lastChild.data = "取消只读"
        } else {
          $('.btn-readonly')[0].lastChild.data = "标记为只读"
        }
      }
      $menu.css({ left: x, top: y , 'min-width': '90px'});
      $menu.find('.btn-open-new-tab').attr({
        href: path,
        target: '_blank'
      });
      window.Clipboard && new Clipboard('.btn-copy', {
        text: function () {
          return $item.text().trim();
        }
      });
      // submodule 菜单事件
      // 编辑子模块
      if (!hasNormal) {
        $menu.find('.btn-compact-edit').addClass('disabled')
      }
      $menu.find('.btn-compact-edit').on('click', function(event) {
        if (!hasNormal) {
          return
        }
        window.location.href = submoduleEditUrl
      });
      // 删除子模块
      $menu.find('.btn-submodule-delete').on('click', function(event) {
        removeSubmodule(submoduleDeleteUrl, $item)
      });
      // 普通文件 菜单事件
      $menu.find('.btn-rename').on('click', function(event) {
        rename($item.parent().attr('file_hex'));
      });
      $menu.find('.btn-delete').on('click', function(event) {
        removeFile($item.parent().next().find('.ui.form').attr('path').replace(/\+/g, '%20'), $item.find('a').text());
      })
      $menu.find('.btn-readonly').on('click', function(event) {
        var obj = $item.parent().next().find('.ui.form').attr('path').replace(/\+/g, '%20')
        var readonly = $item.attr('data-readonly') !== undefined
        if (readonly) {
          removeReadonlyMark(obj, $item)
        } else {
          addReadonlyMark(obj, $item)
        }
      })
      $menu.find('.btn-readonly-is-uncharged-enterprise').popup({
        content: "仅付费企业版可使用文件只读功能",
        className: {
          popup: 'ui popup',
        },
        position: 'bottom center'
      })
      $menu.find('.btn-readonly-is-open-svn').popup({
        content: "仓库已开启 SVN 支持，无法标记只读文件/目录",
        className: {
          popup: 'ui popup',
        },
        position: 'bottom center'
      })
    }
    // submodule 右键菜单事件
  
    var editing = false
  
    $(document).on('click',function(event){
      if (hasTreeContextMenu && event.button !== 2) {
        setTimeout(function () {
          $('.tree-context').remove();
          hasTreeContextMenu = false;
        }, 200);
      }
    })
  
    $('.tree-item').on('click',function(event){
      if (hasTreeContextMenu) {
        event.preventDefault();
      }
    })
  
    function isReadonly(path) {
      if (!gon.readonlyItems) {
        return false
      } else {
        var item_path = getItemPath(path, 'folder')
        return isTreeItemReadonly(item_path, gon.readonlyItems)
      }
    }
  
    function isParentsReadonly(path) {
      var self_path = path.replace(/\/$/, '')
      var parentPathArray = self_path.split('/')
      if (parentPathArray.length < 2) {
        return false
      }
      parentPathArray.pop()
      var parentPath = parentPathArray.join('/') + '/'
      return isReadonly(parentPath)
    }
  
    // 删除只读标记
    function removeReadonlyMark(path, $item) {
      var $icon = $($item.context.children[0])
      var $parent = $item.parent('.tree-item')
      var type = $parent.data('type')
      var branch = $parent.data('branch')
      var readonly_item = $item.data('path')
      if (type !== 'file') {
        readonly_item += "/"
      }
  
      var confirmString = "\n      <p>所属分支: <code class=\"readonly-branch\">".concat(htmlSafe(branch), "</code></p>      <p>文件路径: <code class=\"readonly-path\">").concat(htmlSafe(readonly_item), "</code></p>      <strong>确认取消分支上这个路径的只读标记？</strong>\n      ");
  
      gitGCModal.confirm("取消只读", confirmString, function() {
        var parentsReadonly = isParentsReadonly(readonly_item)
        if (parentsReadonly) {
          return gitGCModal.alert('提示', '只读记录不存在，或父级目录为只读',function () {
            location.reload()
          })
        }
        $.ajax({
          url: "/data_code/coding/readonly",
          type: 'DELETE',
          data: {
            branch: branch,
            path: readonly_item
          },
          success: function(res) {
            if (res.code !== 0) {
              gitGCModal.alert("提示", res.msg, function() {
                location.reload();
              })
            }else {
              $parent.removeClass('readonly-item')
              if (gon.readonlyItems) {
                gon.readonlyItems.splice(gon.readonlyItems.indexOf(readonly_item), 1)
              }
              if (type === 'file') {
                $icon.removeClass('icon-file-readonly readonly-icon')
                $icon.addClass('icon-file')
              } else {
                $icon.removeClass('icon-folder-readonly readonly-icon')
                $icon.addClass('icon-folders')
              }
              $icon.popup('destroy')
              $item.removeAttr('data-readonly')
              location.reload();
            }
          }
        })
      })
    }
  
    // 只读过滤
    function isTreeItemReadonly(path, readonlyItems) {
      var item = readonlyItems.find(function(item) {
        if (item.slice(-1) === '/') {
          return path.indexOf(item) === INDEX_BEGIN_WITH_READONLY_DIR
        } else {
          return path === item
        }
      })
      return item !== undefined
    }
  
    function getItemPath(path) {
      var path_type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'file';
      return path_type === 'file' ? path : "".concat(path, "/");
    }
  
    // 启用异步只读差异化的次数
    var is_can_readonly = false
    // 异步对文件树进行只读差异化显示
    function markTree() {
      $.ajax({
        url: "/data_code/coding/readonly",
        method: 'get',
        data: {
          "branch": "master"
        },
        success:function(result) {
          var readonlyItems = result.readonly_items
          gon.readonlyItems = readonlyItems
          $(".tree-list-item").each(function(){
            $this = $(this)
            var path = $this.attr('data-path')
            var type = $this.attr('data-type')
            var item_path = getItemPath(path, type)
            var readonly = isTreeItemReadonly(item_path, readonlyItems)
            $icon = $this.find('i')
            $parent = $this.parent('.tree-item')
            if (readonly) {
              $parent.addClass('readonly-item')
              $this.attr('data-readonly', '')
              $icon.attr('class', "iconfont icon-".concat(type, "-readonly readonly-icon"));
              $icon.attr('data-readonly', '')
              $icon.popup({
                content: "只读",
                className   : {
                  popup: 'ui popup dark',
                },
                position: 'top center'
              })
            } else {
              var className =  type === 'file' ? 'file' : 'folders'
              $this.removeAttr('data-readonly')
              $icon.attr('class', "iconfont icon-".concat(className));
              $icon.removeAttr('data-readonly')
            }
          })
        }
      })
    }
  
    // 若已开启只读功能，对目录进行只读差异化标记
    if (is_can_readonly) {
      markTree()
    }
  
    // 添加只读标记
    function addReadonlyMark(path, $item) {
      var $icon = $($item.context.children[0])
      var $parent = $item.parent('.tree-item')
      var type = $parent.data('type')
      var branch = $parent.data('branch')
      var readonly_item = $item.data('path')
      if (type !== 'file') {
        readonly_item += "/"
      }
  
      var confirmString = "\n      <p>所属分支: <code class=\"readonly-branch\">".concat(htmlSafe(branch), "</code></p>      <p>文件路径: <code class=\"readonly-path\">").concat(htmlSafe(readonly_item), "</code></p>      <strong>确认将分支上的这个路径标记为只读？</strong>\n      ");
      gitGCModal.confirm("标记只读", confirmString,function (){
        $.ajax({
          url: "/data_code/coding/readonly",
          type: 'POST',
          data: {
            branch: branch,
            path: readonly_item,
          },
          success: function(res) {
            if (res.code !== 0) {
              gitGCModal.alert("提示", res.msg,function (){
                location.reload();
              })
            } else {
              // 之前未开启只读功能
              if (!is_can_readonly) {
                is_can_readonly = true
                return markTree()
              }
              $parent.addClass('readonly-item')
              var existReadonlyItems = gon.readonlyItems || []
              existReadonlyItems.push(readonly_item)
              gon.readonlyItems = existReadonlyItems
              $icon.popup({
                content: "只读",
                className   : {
                  popup: 'ui popup dark',
                },
                position: 'top center'
              })
              if (type === 'file') {
                $icon.removeClass('icon-file')
                $icon.addClass('icon-file-readonly readonly-icon')
              } else {
                $icon.removeClass('icon-folders')
                $icon.addClass('icon-folder-readonly readonly-icon')
              }
              $item.attr('data-readonly', '')
              location.reload();
            }
          }
        })
      })
    }
  
    function removeFile(path, file_name) {
      var file_name = file_name || path
      var content = "确定要删除 %{name} 吗？".replace('%{name}', htmlSafe(file_name));
      gitGCModal.confirm("删除", content, function() {
        $.ajax({
          type: "DELETE",
          dataType: "JSON",
          url: "/data_code/coding/delete/" + path,
          success: function(res) {
            if (res.status != 1) {
              var alert_message = res.message || "删除失败"
              return gitGCModal.alert("提示", alert_message)
            }
            if ($('.tree-item-file-name').length == 2) {
              window.location.href = '/' + gon.user_project;
              if(file_name.toUpperCase()==='LICENSE'){
                window.location.reload();
              }
            } else {
              window.location.href = window.location.pathname;
              if(file_name.toUpperCase()==='LICENSE'){
                window.location.reload();
              }
            }
          }
        });
      })
    }
    // 删除子模块
    function removeSubmodule(deleteUrl, $item) {
      if (!deleteUrl) return
      var file_name = $item.text().trim()
      var content = "此操作无法恢复，确定要删除子模块%{name}？".replace('%{name}', htmlSafe(file_name));
      new GiteeModalHelper({
        approveText: "删除并提交推送",
        cancelText: "取消",
        okText: "删除并提交推送",
      }).confirm("删除", content, function() {
        $.ajax({
          type: "DELETE",
          dataType: "JSON",
          url: deleteUrl,
          success: function(res) {
            if (res.status == 200) {
              $item.closest('.row.tree-item').remove();
              window.location.reload();
            } else {
              Flash.error(res.message, 5000)
            }
          },
          error: function (err) {
            err.responseJSON && Flash.error(err.responseJSON.message);
          },
        });
      })
    }
  
    function rename(file_hex) {
      $(".row.tree-item").show();
      $(".tree-item-rename").hide();
  
      if($("."+file_hex).is(':hidden') == true) return;
  
      $("."+file_hex).hide();
      var _t = $(".rename-"+file_hex);
      src = _t.attr('src_text')
      if(src==undefined){
         newName = _t.find("[name='new_filename']").val()
        _t.attr('src_text',newName)
      }else{
        _t.find("[name='new_filename']").val(_t.attr('src_text'))
      }
      $(".rename-"+file_hex).css("display","");
    }
  
    setTimeout(function(){
      $(".popup-save").click(function(){
        form = $(this).parents(".ui.form")
        file_hex = $(this).parents(".row.tree-item").attr("file_hex");
        new_filename = $.trim(form.find("[name='new_filename']").val())
        overwrite = false
        $('.tree-item-file-name').find('a').each(function(a){
          title = $(this).attr('title');
          if(title != undefined){
            if (title.split('/')[0] == new_filename) {
              overwrite = true;
            }
          }
        });
        if(overwrite){
          form.find("[name='new_filename']").focus();
          gitGCModal.alert("提示", "存在相同的文件名,请修改后重试")
          return;
        }
        $.ajax({
          type: 'POST',
          url: "/data_code/coding/rename/"+ form.attr('path').replace(/\+/g, '%20'),
          data:
          {
            new_filename: new_filename
          },
          success: function(o){
            if(o.status == 1){
              href = window.location.href.split('?')[0]
              window.location.href = href;
            }else {
              var alert_message = o.message || "重命名失败"
              gitGCModal.alert("提示", alert_message)
            }
          },
          dataType: "json"
        });
      })
  
      $(".popup-close").click(function(){
        $(".row.tree-item").show();
        $(".tree-item-rename").hide();
      })
      $('.tree-item-file-name, .tree-item-submodule-name').each(function() {
        var $this = $(this);
        if (typeof $this.parent().attr('file_hex') === 'undefined') {
          return;
        }
        $this.on('contextmenu', function(event) {
          event.preventDefault();
          createContextMenu($this, event.pageX, event.pageY);
        })
      })
    },1000)
  })
</script>
<style>
  .readonly-item {
    background-color: #FBFBFB !important;
  }
  .readonly-path,.readonly-branch {
    display: block;
    white-space: normal;
    word-break: break-word;
    line-height: 1.8;
    margin-top: 1em;
  }
  .btn-readonly-is-uncharged-enterprise, .btn-readonly-is-open-svn {
    background-color: #f5f5f5 !important;
    color: #757575 !important;
  }
</style>

<div class='complaint'>
<div class='ui modal small form' id='landing-comments-complaint-modal'>
<i class='iconfont icon-close close'></i>
<div class='header'>
举报
</div>
<div class='content'>
<div class='appeal-success-tip hide'>
<i class='iconfont icon-ic_msg_success'></i>
<div class='appeal-success-text'>
举报成功
</div>
<span>
我们将于2个工作日内通过站内信反馈结果给你！
</span>
</div>
<div class='appeal-tip'>
请认真填写举报原因，尽可能描述详细。
</div>
<div class='ui form appeal-form'>
<div class='inline field'>
<label class='left-part appeal-type-wrap'>
举报类型
</label>
<div class='ui dropdown selection' id='appeal-comments-types'>
<div class='text default'>
请选择举报类型
</div>
<i class='dropdown icon'></i>
<div class='menu'></div>
</div>
</div>
<div class='inline field'>
<label class='left-part'>
举报原因
</label>
<textarea class='appeal-reason' id='appeal-comment-reason' name='msg' placeholder='请说明举报原因' rows='3'></textarea>
</div>
<div class='ui message callback-msg hide'></div>
<div class='ui small error text message exceeded-size-tip'></div>
</div>
</div>
<div class='actions'>
<div class='ui button blank cancel'>
取消
</div>
<div class='ui orange icon button disabled ok' id='complaint-comment-confirm'>
发送
</div>
</div>
</div>
<script>
  var $complaintCommentsModal = $('#landing-comments-complaint-modal'),
      $complainCommentType = $complaintCommentsModal.find('#appeal-comments-types'),
      $complaintModalTip = $complaintCommentsModal.find('.callback-msg'),
      $complaintCommentsContent = $complaintCommentsModal.find('.appeal-reason'),
      $complaintCommentBtn = $complaintCommentsModal.find('#complaint-comment-confirm'),
      complaintSending = false,
      initedCommentsType = false;
  
  function initCommentsTypeList() {
    if (!initedCommentsType) {
      $.ajax({
        url: "/appeals/fetch_types",
        method: 'get',
        data: {'type': 'comment'},
        success: function (data) {
          var result = '';
          for (var i = 0; i < data.length; i++) {
            result = result + "<div class='item' data-value='" + data[i].id + "'>" + data[i].name + "</div>";
          }
          $complainCommentType.find('.menu').html(result);
        }
      });
      $complainCommentType.dropdown({showOnFocus: false});
      initedCommentsType = true;
    }
  }
  $complainCommentType.on('click', function() {
    $complaintCommentsModal.modal({
      autofocus: false,
      onApprove: function() {
        return false;
      },
      onHidden: function() {
        restoreCommonentDefault();
      }
    }).modal('show');
  });
  
  $complaintCommentsContent.on('change keyup', function(e) {
    var content = $(this).val();
    if ($.trim(content).length > 0 && $complainCommentType.dropdown('get value').length > 0 ) {
      $complaintCommentBtn.removeClass('disabled');
      return;
    }
    $complaintCommentBtn.addClass('disabled');
  });
  
  
  $complainCommentType.dropdown({
    showOnFocus: false,
    onChange: function(value, text, $selectedItem) {
      if (value.length > 0 && $.trim($complaintCommentsContent.val()).length > 0) {
        $complaintCommentBtn.removeClass('disabled');
        return
      }
      $complaintCommentBtn.addClass('disabled');
    }
  });
  
  function restoreCommonentDefault() {
    $complainCommentType.dropdown('restore defaults');
    $complaintCommentsContent.val('');
    $('.exceeded-size-tip').text('').hide();
    $complaintModalTip.text('').hide();
    setTimeout(function() {
      setCommentSendTip(false);
    }, 1500);
  }
  
  $complaintCommentBtn.on('click',function(e){
    var reason = $complaintCommentsContent.val();
    var appealableId = $('#landing-comments-complaint-modal').attr('data-id');
    if (complaintSending) {
      return;
    }
    var appealType = $complainCommentType.dropdown('get value');
    var formData = new FormData();
    formData.append('appeal_type_id', appealType);
    formData.append('reason', reason);
    formData.append('appeal_type','Note');
    formData.append('target_id',appealableId);
    $.ajax({
      type: 'POST',
      url: "/appeals",
      cache: false,
      contentType: false,
      processData: false,
      data: formData,
      beforeSend: function() {
        setCommentSendStatus(true);
      },
      success: function(res) {
        if (res.status == 200) {
          setCommentSendTip(true);
          setTimeout(function() {
            $complaintCommentsModal.modal('hide');
            restoreCommonentDefault();
          }, 3000);
        }
        setCommentSendStatus(false);
      },
      error: function(err) {
        showCommonTips(err.responseJSON.message, 'error');
        setCommentSendStatus(false);
      }
    })
  });
  
  function showCommonTips(text, type) {
    $complaintModalTip.text(text).show();
    if (type == 'error') {
      $complaintModalTip.removeClass('success').addClass('error');
    } else {
      $complaintModalTip.removeClass('error').addClass('success');
    }
  }
  
  function setCommentSendStatus(value) {
    complaintSending = value;
    if (complaintSending) {
      $complaintCommentBtn.addClass('loading');
      $complaintCommentsContent.attr('readonly', true);
      $complainCommentType.attr('readonly', true);
    } else {
      $complaintCommentBtn.removeClass('loading');
      $complaintCommentsContent.attr('readonly', false);
      $complainCommentType.attr('readonly', false);
    }
  }
  
  function setCommentSendTip(value) {
    if (value) {
      $('.appeal-success-tip').removeClass('hide');
      $('.appeal-tip').addClass('hide');
      $('.appeal-form').addClass('hide');
      $('#landing-comments-complaint-modal .actions').addClass('hide');
    } else {
      $('.appeal-success-tip').addClass('hide');
      $('.appeal-tip').removeClass('hide');
      $('.appeal-form').removeClass('hide');
      $('#landing-comments-complaint-modal .actions').removeClass('hide');
    }
  }
</script>

<div class='ui small modal' id='misjudgment_appeal_modal'>
<i class='close icon'></i>
<div class='header dividing ui'>
误判申诉
</div>
<div class='content'>
<p>此处可能存在不合适展示的内容，页面不予展示。您可通过相关编辑功能自查并修改。</p>
<p>如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容，可点击提交进行申诉，我们将尽快为您处理。</p>
<div class='buttons'>
<div class='ui button blank cancel'>取消</div>
<div class='ui button orange submit'>提交</div>
</div>
</div>
</div>
<style>
  #misjudgment_appeal_modal .buttons {
    float: right;
    margin-top: 30px;
    margin-bottom: 20px; }
    #misjudgment_appeal_modal .buttons .cancel {
      margin-right: 20px; }
</style>
<script>
  var $misjudgmentAppealModal = $('#misjudgment_appeal_modal');
  $('.cancel').on('click',function(){
    $misjudgmentAppealModal.modal('hide');
  });
  var $jsSubmitAppeal = $misjudgmentAppealModal.find('.submit')
  $jsSubmitAppeal.on('click', function(e) {
    e.preventDefault();
    $(this).addClass('loading').addClass('disabled');
    var type = $(this).attr('data-type');
    var id = $(this).attr('data-id');
    var projectId = $(this).attr('data-project-id');
    var appealType = $(this).attr('data-appeal-type');
    $.ajax({
      type: "PUT",
      url: "/misjudgment_appeal",
      data: {
        type: type,
        id: id,
        project_id: projectId,
        appeal_type: appealType
      },
      success: function(data) {
        Flash.info('提交成功');
        $jsSubmitAppeal.removeClass('loading');
        $misjudgmentAppealModal.modal('hide');
        location.reload()
      },
      error: function(e) {
        Flash.error('提交失败:'+e.responseText);
        $jsSubmitAppeal.removeClass('loading').removeClass('disabled');
        location.reload()
      }
    });
  })
</script>

</div>
<script>
  "use strict";
  $('.js-check-star').checkbox('set unchecked')
</script>

</div>
<script>
  (function() {
    $(function() {
      Tree.init();
      return TreeCommentActions.init();
    });
  
  }).call(this);
</script>
</div>
</div>
<div class='four wide column' style=''>
<div class='project__right-side'>
<div class='side-item intro'>
<div class='header'>
<h4>简介</h4>
<a class="ui link button pull-right btn-edit" href="javascript:void(0);"><i class='iconfont icon-edit'></i>
</a></div>
<div class='content'>
<span class='git-project-desc-text text-muted'>暂无描述</span>
<a class='hide spread' href='javascript:void(0);'>
展开
<i class='caret down icon'></i>
</a>
<a class='retract hide' href='javascript:void(0);'>
收起
<i class='caret up icon'></i>
</a>
<div class='intro-list'>
<div class='blank d-flex d-flex-between dropdown item js-project-label_show label-list-line-feed project-label-list ui' data-labels='[]' data-url='/data_code/coding/update_description'>
<div class='mixed-label'>
</div>

<div class='default'>暂无标签</div>
<i class='iconfont icon-add-thin hover-color cursor-pointer'></i>
<div class='menu w100'>
<div class='ui input mt-1 mb-1 ml-1 mr-1'>
<input maxlength='35' placeholder='搜索或创建标签' type='text'>
</div>
<div class='scrolling menu'>
<div class='item d-none-important' data-is-related='0' data-value=''></div>
</div>
</div>
</div>
<div class='hide item'>
<i class='iconfont icon-link'></i>
<span class='git-project-homepage'>
<a rel="nofollow" id="homepage" target="_blank" href="/data_code/coding">/data_code/coding</a>
</span>
</div>

<!-- - page = @project.page -->
<!-- - if page&.status? -->
<!-- .item -->
<!-- %i.iconfont.icon-giteepage -->
<!-- Pages： -->
<!-- = link_to page.domain_url, page.domain_url, target: '_blank' -->
</div>
</div>
<div class='content intro-form'>
<div class='ui small input'>
<textarea name='project[description]' placeholder='描述' rows='5'></textarea>
</div>
<div class='ui small input'>
<input data-regex-value='(^$)|(^(http|https):\/\/(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).*)|(^(http|https):\/\/[a-zA-Z0-9]+([_\-\.]{1}[a-zA-Z0-9]+)*\.[a-zA-Z]{2,10}(:[0-9]{1,10})?(\?.*)?(\/.*)?$)' name='project[homepage]' placeholder='主页(eg: https://gitee.com)' type='text'>
</div>
<button class='ui orange button mt-1 btn-save'>
保存更改
</button>
<div class='ui blank button btn-cancel-edit'>
取消
</div>
</div>
</div>
<div class='side-item release'>
<div class='header'>
<h4>发行版</h4>
</div>
<div class='content'>
<span class='text-muted'>
暂无发行版，
<a href="/data_code/coding/releases/new">创建</a>
</span>
</div>
</div>
<div class='side-item contrib' data-url='/data_code/coding/contributors_count?ref=master' id='contributor'>
<div class='header'>
<h4>
贡献者
<span class='text-muted' id='contributor-count'></span>
</h4>
<a class="ui link button pull-right" href="/data_code/coding/contributors?ref=master">全部</a>
</div>
<div class='content' id='contributor-list'></div>
<div class='ui active centered inline loader' id='contributor-loader'></div>
</div>
<div class='side-item events' data-url='/data_code/coding/events.json' id='proj-events'>
<div class='header'>
<h4>近期动态</h4>
</div>
<div class='content'>
<div class='ui comments' id='event-list'></div>
<a class="loadmore hide" href="javascript:void(0);">加载更多
<i class='icon dropdown'></i>
</a><center>
<div class='text-muted nomore hide'>不能加载更多了</div>
<div class='ui inline loader active'></div>
</center>
</div>
</div>
</div>
<div class='ui modal tiny' id='edit-project-description'>
<i class='iconfont icon-close close'></i>
<div class='header'>编辑仓库简介</div>
<div class='content'>
<div class='item mb-2'>
<div class='title label'>简介内容</div>
<div class='ui small input'>
<textarea maxlength='200' name='project[description]' placeholder='描述' rows='5'></textarea>
</div>
</div>
<div class='item mb-2'>
<div class='title label'>主页</div>
<div class='ui small input'>
<input data-regex-value='(^$)|(^(http|https):\/\/(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).*)|(^(http|https):\/\/[a-zA-Z0-9]+([_\-\.]{1}[a-zA-Z0-9]+)*\.[a-zA-Z]{2,10}(:[0-9]{1,10})?(\?.*)?(\/.*)?$)' name='project[homepage]' placeholder='主页(eg: https://gitee.com)' type='text'>
</div>
</div>
</div>
<div class='actions'>
<button class='ui button blank cancel'>取消</button>
<button class='ui button orange btn-save'>保存更改</button>
</div>
</div>

<style>
  #license-popup {
    color: #005980;
    cursor: pointer; }
</style>
<script>
  window.gon.projectRightSide = {
    homepage: null,
    description: "",
    url: '/data_code/coding/update_description',
    i18n: {
      invalidHomepage: '不是有效的 http 地址',
      descriptionLimitExceeded: '简介长度不得超过%{limit}个字符',
      noDescription: '暂无描述',
      noPermission: '无权限操作！',
      requestError: '修改发生错误，请稍后重试！'
    }
  }
  window.gon.cloneArrSelectedLabel = [] || []
  $(function () {
    var $editModal = $('#edit-project-description')
    $editModal.modal({
      onShow: function () {
        window.globalUtils.getFocus($editModal.find('textarea'))
      }
    })
    $('.project__right-side').on('click', '.header .btn-edit', function () {
      $editModal.modal('show')
    })
    $('#license-popup').popup({ position: 'bottom center', lastResort: 'bottom center' })
  
    $('.js-project-label_show').projectLabel({
      i18n: {
        empty: "标签名不能为空",
        verify: "标签名只允许包含中文、字母、数字或者中划线(-)，不能以中划线开头，且长度少于35个字符",
        max: "最多选择 5 个标签"
      }
    })
  })
</script>

</div>
<div class='project-right-side-contaner' id='code-parsing'>
<div class='d-flex-between mb-2'>
<div class='title fs-16 d-align-center'>
<img class='mr-1' height='32' src='/static/images/mjc_icon@2x.png' width='32'>
<span class='ai-file-name'>马建仓 AI 助手</span>
</div>
<div>
<i class='iconfont icon-close close gitee-icon-close'></i>
</div>
</div>
<div class='code-parsing-content'>
<div class='sub_title'></div>
<div class='markdown-body'></div>
<div class='bottom-content'>
<div class='js-code-parsing-img'></div>
<div class='ai_code_btns_simple'>
<div class='ai_code_btns_simple_container'>
<div class='mr-1 test-more'>尝试更多</div>
<div class='btn_box' data-text='代码解读' data-value='parsing'>
<div class='btn_box_title'>代码解读</div>
</div>
<div class='btn_box' data-text='代码找茬' data-value='analysis'>
<div class='btn_box_title'>代码找茬</div>
</div>
<div class='btn_box' data-text='代码优化' data-value='optimize'>
<div class='btn_box_title'>代码优化</div>
</div>
</div>
</div>
</div>
</div>
<div class='skeleton'>
<div class='line line1'></div>
<div class='line line2'></div>
<div class='line line3'></div>
<div class='line line4'></div>
<div class='line line1'></div>
<div class='line line2'></div>
<div class='line line3'></div>
<div class='line line4'></div>
<div class='line line1'></div>
<div class='line line2'></div>
<div class='line line3'></div>
<div class='line line4'></div>
</div>
<div class='resize-handle'>
<div class='resize-handle-line'></div>
</div>
<script src="/static/javascripts/markdown-it.min.js"></script>
<script src="https://cn-assets.gitee.com/assets/ai_code_parsing/app-667254dc80e793cb047ec2e07574f422.js"></script>
<script>
  $(function() {
    var maxWidthPercentage = 0.5;
    $("#code-parsing").resizable({
      handles: 'e, w', // 通过左边调整大小
      minWidth: 350, // 设置 代码解析框 的最小宽度
      resize: function(event, ui) {
        var parentWidth = $(this).parent().width();
        var newWidthDiv2 = ui.size.width;
        var newWidthDiv1 = parentWidth - newWidthDiv2;
        // 计算最大宽度
        var maxWidthDiv2 = parentWidth * maxWidthPercentage;
        // 确保 代码解析框 不超过最大宽度
        newWidthDiv2 = Math.min(newWidthDiv2, maxWidthDiv2);
        // 确保 文件详情 至少有最小宽度
        newWidthDiv1 = Math.max(parentWidth - newWidthDiv2, 750);
  
        var percentageCode = (newWidthDiv2 / parentWidth) * 100;
        var percentageProject = (newWidthDiv1 / parentWidth) * 100;
  
        $('#code-parsing').css('width',percentageCode+"%")
        $('.git-project-content-wrapper').find('#sixteen').attr('style', 'width: ' + percentageProject + '% !important;');
        $('.right-wrapper').attr('style', 'width: ' + percentageProject + '% !important;');
        $('.project-conter-container').attr('style', 'width: ' + percentageProject + '% !important;');
      }
    });
  })
</script>

</div>
</div>
</div>
<style>
  .team-member-checkbox .ui.radio.checkbox.checked label:after {
    top: 7px !important; }
</style>
<script>
  function scrollToReadmeBox() {
    var readmeBox = document.getElementById('git-readme');
    if (readmeBox) {
      const topPos = readmeBox.offsetTop;
      window.scrollTo({ top: topPos, behavior: "smooth" });
    }
  }
  $(".box-licence").click(function(event) {
    $('.lisence-content').show()
    $('.lisence-edit').show()
    $('.readme-content').hide()
    $('.readme-edit').hide()
    $('#git-readme').removeClass('unshow')
    $('.file_title_license').addClass('active-title')
    $('.file_title_readme').removeClass('active-title')
    scrollToReadmeBox()
  });
  
  // 防止二次挂载
  if (false) {
    window.gon.tree_left_side_loaded = true;
  }
</script>
<script src="https://cn-assets.gitee.com/webpacks/gitee-linker.b5c93d77567006097fca.js"></script>
<link rel="stylesheet" media="all" href="https://cn-assets.gitee.com/assets/markdown_preview-001478f1b12f2725f1b1f76f36b9ce4e.css" />
<script src="https://cn-assets.gitee.com/assets/markdown_preview-772822b3442a45aaf94af83c38fdbaf4.js"></script>
<script src="https://cn-assets.gitee.com/webpacks/markdown_render-2d492a61c118e7d27f3e.bundle.js" defer="defer"></script>

</div>
<script>
  (function() {
    var donateModal;
  
    Gitee.modalHelper = new GiteeModalHelper({
      alertText: '提示',
      okText: '确定'
    });
  
    donateModal = new ProjectDonateModal({
      el: '#project-donate-modal',
      alipayUrl: '/data_code/coding/alipay',
      wepayUrl: '/data_code/coding/wepay',
      nameIsBlank: '名称不能为空',
      nameTooLong: '名称过长（最多为 36 个字符）',
      modalHelper: Gitee.modalHelper
    });
  
    if (null === 'true') {
      donateModal.show();
    }
  
    $('#project-donate').on('click', function() {
      return donateModal.show();
    });
  
  }).call(this);
</script>
<script>
  Tree.initHighlightTheme('white')
</script>


</div>
<div class='gitee-project-extension'>
<div class='extension public'>1</div>
<div class='extension https'>https://gitee.com/data_code/coding.git</div>
<div class='extension ssh'>git@gitee.com:data_code/coding.git</div>
<div class='extension namespace'>data_code</div>
<div class='extension repo'>coding</div>
<div class='extension name'>coding</div>
<div class='extension branch'>master</div>
</div>
<style>
  .gfm-team_member[data-username="data_code"] {
    padding: 0 4px;
    background: rgba(44,126,248,0.10);
    border-radius: 2px;
  }
</style>

<script>
  $(function() {
    GitLab.GfmAutoComplete.dataSource = "/data_code/coding/autocomplete_sources"
    GitLab.GfmAutoComplete.Emoji.assetBase = '/assets/emoji'
    GitLab.GfmAutoComplete.setup();
  });
</script>

<footer id='git-footer-main'>
<div class='ui container'>
<div class='logo-row'>
<a href="https://gitee.com"><img alt='Gitee - 基于 Git 的代码托管和研发协作平台' class='logo-img' src='/static/images/logo-black.svg?t=158106666'>
</a></div>
<div class='name-important'>
深圳市奥思网络科技有限公司版权所有
</div>
<div class='ui two column grid d-flex-center'>
<div class='eight wide column git-footer-left'>
<div class='ui four column grid' id='footer-left'>
<div class='column'>
<div class='ui link list'>
<div class='item'>
<a class="item" href="/all-about-git">Git 大全</a>
</div>
<div class='item'>
<a class="item" rel="nofollow" href="https://help.gitee.com/learn-Git-Branching/">Git 命令学习</a>
</div>
<div class='item'>
<a class="item" rel="nofollow" href="https://copycat.gitee.com/">CopyCat 代码克隆检测</a>
</div>
<div class='item'>
<a class="item" href="/appclient">APP与插件下载</a>
</div>
</div>
</div>
<div class='column'>
<div class='ui link list'>
<div class='item'>
<a class="item" href="/gitee_reward">Gitee Reward</a>
</div>
<div class='item'>
<a class="item" href="/gitee-stars">Gitee 封面人物</a>
</div>
<div class='item'>
<a class="item" href="/gvp">GVP 项目</a>
</div>
<div class='item'>
<a class="item" rel="nofollow" href="https://blog.gitee.com/">Gitee 博客</a>
</div>
<div class='item'>
<a class="item" href="/enterprises#nonprofit-plan">Gitee 公益计划</a>
</div>
<div class='item'>
<a class="item" href="https://gitee.com/features/gitee-go">Gitee 持续集成</a>
</div>
</div>
</div>
<div class='column'>
<div class='ui link list'>
<div class='item'>
<a class="item" href="/api/v5/swagger">OpenAPI</a>
</div>
<div class='item'>
<a class="item" href="https://help.gitee.com">帮助文档</a>
</div>
<div class='item'>
<a class="item" href="/self_services">在线自助服务</a>
</div>
<div class='item'>
<a class="item" href="/help/articles/4378">更新日志</a>
</div>
</div>
</div>
<div class='column'>
<div class='ui link list'>
<div class='item'>
<a class="item" href="/about_us">关于我们</a>
</div>
<div class='item'>
<a class="item" rel="nofollow" href="https://www.oschina.net/news/131099/oschina-hiring">加入我们</a>
</div>
<div class='item'>
<a class="item" href="/terms">使用条款</a>
</div>
<div class='item'>
<a class="item" href="/oschina/git-osc/issues">意见建议</a>
</div>
<div class='item'>
<a class="item" href="/links.html">合作伙伴</a>
</div>
</div>
</div>
</div>
</div>
<div class='eight wide column right aligned followus git-footer-right'>
<div class='qrcode mr-1'>
<div class='qrcode-box'>
<img alt="技术交流QQ群" src="https://cn-assets.gitee.com/assets/contact_qr-5e2c2a8da453396590e56a545bce4974.jpg" />
</div>
<p class='mt-1 mini_app-text'>技术交流QQ群</p>
</div>
<div class='qrcode'>
<div class='qrcode-box'>
<img alt="微信服务号" class="weixin-qr" src="https://cn-assets.gitee.com/assets/qrcode-weixin@2x-b74cc97a2ea80123ea53a737f709836d.png" />
</div>
<p class='mt-1 weixin-text'>微信服务号</p>
</div>
<div class='phone-and-qq column'>
<div class='ui list official-support-container'>
<div class='item'></div>
<div class='item mail-and-zhihu'>
<a rel="nofollow" href="mailto: client@oschina.cn"><i class='iconfont icon-msg-mail'></i>
<span id='git-footer-email'>client#oschina.cn</span>
</a></div>
<div class='item tel'>
<a>
<i class='iconfont icon-tel'></i>
<span>企业版在线使用：400-606-0201</span>
</a>
</div>
<div class='item tel'>
<a class='d-flex'>
<i class='iconfont icon-tel mt-05 mr-05'></i>
<span>专业版私有部署：</span>
<div>
<div>13670252304</div>
<div>13352947997</div>
</div>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class='bottombar'>
<div class='ui container'>
<div class='ui d-flex d-flex-between'>
<div class='seven wide column partner d-flex'>
<div class='open-atom d-flex-center'>
<img class="logo-openatom mr-1" alt="开放原子开源基金会" src="https://cn-assets.gitee.com/assets/logo-openatom-d083391cc8a54e283529f3fc11cc38ca.svg" />
<a target="_blank" rel="nofollow" href="https://www.openatom.org/">开放原子开源基金会</a>
<div class='sub-title ml-1'>合作代码托管平台</div>
</div>
<div class='report-12377 d-flex-center ml-3'>
<img class="report-12377__logo mr-1" alt="违法和不良信息举报中心" src="https://cn-assets.gitee.com/assets/12377@2x-1aa42ed2d2256f82a61ecf57be1ec244.png" />
<a target="_blank" rel="nofollow" href="https://12377.cn">违法和不良信息举报中心</a>
</div>
<div class='copyright ml-3'>
<a rel="nofollow" href="http://beian.miit.gov.cn/">粤ICP备12009483号</a>
</div>
</div>
<div class='nine wide column right aligned'>
<i class='icon world'></i>
<a href="/language/zh-CN">简 体</a>
/
<a href="/language/zh-TW">繁 體</a>
/
<a href="/language/en">English</a>
</div>
</div>
</div>
</div>
</footer>

<script>
  var officialEmail = $('#git-footer-email').text()
  $('#git-footer-main .icon-popup').popup({ position: 'bottom center' })
  $('#git-footer-email').text(officialEmail.replace('#', '@'))
  window.gon.popover_card_locale = {
    follow:"关注",
    unfollow:"已关注",
    gvp_title: "GVP - Gitee 最有价值开源项目",
    project: "项目",
    org: "开源组织",
    member: "",
    author: "作者",
    user_blocked: "该用户已被屏蔽或已注销",
    net_error: "网络错误",
    unknown_exception: "未知异常"
  }
  window.gon.select_message = {
    placeholder: "请输入个人空间地址或完整的邮箱地址"
  }
</script>
<script src="https://cn-assets.gitee.com/webpacks/popover_card-ca6b9a20ba5353733d61.bundle.js"></script>
<link rel="stylesheet" media="all" href="https://cn-assets.gitee.com/webpacks/css/gitee_nps-ae0dbee40f6ddc72015a.css" />
<script src="https://cn-assets.gitee.com/webpacks/gitee_nps-30c2a3673b61c539fcf7.bundle.js"></script>
<script src="https://cn-assets.gitee.com/webpacks/gitee_icons-0340f9dc8fc1dfbb9937.bundle.js"></script>



<div class='side-toolbar'>
<div class='button toolbar-help'>
<i class='iconfont icon-help'></i>
</div>
<div class='ui popup left center dark'>点此查找更多帮助</div>
<div class='toolbar-help-dialog'>
<div class='toolbar-dialog-header'>
<h3 class='toolbar-dialog-title'>搜索帮助</h3>
<form class="toolbar-help-search-form" action="/help/load_keywords_data" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" />
<div class='ui icon input fluid toolbar-help-search'>
<input name='keywords' placeholder='请输入产品名称或问题' type='text'>
<i class='icon search'></i>
</div>
</form>

<i class='iconfont icon-close toolbar-dialog-close-icon'></i>
</div>
<div class='toolbar-dialog-content'>
<div class='toolbar-help-hot-search'>
<div class='toolbar-roll'>
<a class="init active" title="Git 命令在线学习" href="https://oschina.gitee.io/learn-git-branching/?utm_source==gitee-help-widget"><i class='Blue icon icon-command iconfont'></i>
<span>Git 命令在线学习</span>
</a><a class="init " title="如何在 Gitee 导入 GitHub 仓库" href="https://gitee.com/help/articles/4261?utm_source==gitee-help-widget"><i class='icon icon-clipboard iconfont orange'></i>
<span>如何在 Gitee 导入 GitHub 仓库</span>
</a></div>
<div class='toolbar-list'>
<div class='toolbar-list-item'>
<a href="/help/articles/4114">Git 仓库基础操作</a>
</div>
<div class='toolbar-list-item'>
<a href="/help/articles/4166">企业版和社区版功能对比</a>
</div>
<div class='toolbar-list-item'>
<a href="/help/articles/4191">SSH 公钥设置</a>
</div>
<div class='toolbar-list-item'>
<a href="/help/articles/4194">如何处理代码冲突</a>
</div>
<div class='toolbar-list-item'>
<a href="/help/articles/4232">仓库体积过大，如何减小？</a>
</div>
<div class='toolbar-list-item'>
<a href="/help/articles/4279">如何找回被删除的仓库数据</a>
</div>
<div class='toolbar-list-item'>
<a href="/help/articles/4283">Gitee 产品配额说明</a>
</div>
<div class='toolbar-list-item'>
<a href="/help/articles/4284">GitHub仓库快速导入Gitee及同步更新</a>
</div>
<div class='toolbar-list-item'>
<a href="/help/articles/4328">什么是 Release（发行版）</a>
</div>
<div class='toolbar-list-item'>
<a href="/help/articles/4354">将 PHP 项目自动发布到 packagist.org</a>
</div>
</div>
</div>
<div class='toolbar-help-search-reseult'></div>
</div>
</div>
<script>
  var opt = { position: 'left center'};
  var $helpSideToolbar = $('.button.toolbar-help');
  var $toolbarRoll = $('.toolbar-roll');
  
  $(function() {
    if (true) {
      $helpSideToolbar.popup(opt).popup({lastResort:'left center'})
    } else {
      $helpSideToolbar.popup({lastResort:'left center'}).popup('show', opt);
      setTimeout(function() {
        $helpSideToolbar.popup('hide', opt);
      }, 3000);
    }
  
    if ($toolbarRoll.length) {
      setInterval(function() {
        var $nextActiveLink = $toolbarRoll.find('a.active').next();
        if (!$nextActiveLink.length) {
          $nextActiveLink = $toolbarRoll.find('a:first-child');
        }
        $nextActiveLink.attr('class', 'active').siblings().removeClass('active init');
      }, 5000);
    }
  })
</script>

<div class='ui popup dark left center transition hidden js-feedback-popup'>发送反馈</div>
<div class='button' id='feedback-btn'>
<i class='iconfont icon-feedback'></i>
</div>
<div class='popup button' id='home-comment'>
<i class='iconfont icon-comment'></i>
</div>
<div class='ui popup dark'>评论</div>
<div class='button gotop popup' id='gotop'>
<i class='iconfont icon-top'></i>
</div>
<div class='ui popup dark'>回到顶部</div>
</div>
<style>
  .side-toolbar .bdsharebuttonbox a {
    font-size: 24px;
    color: white !important;
    opacity: 0.9;
    margin: 6px 6px 0px 6px;
    background-image: none;
    text-indent: 0;
    height: auto;
    width: auto;
  }
</style>
<style>
  #udesk_btn a {
    margin: 0px 20px 217px 0px !important;
  }
  #ent-sale-img-wrap {
    margin: 0px 15px 294px 0px !important;
  }
</style>
<script>
  (function() {
    $('#project-user-message').popup({
      position: 'left center'
    });
  
  }).call(this);
</script>
<script>
  Gitee.initSideToolbar({
    hasComment: true,
    commentUrl: '/data_code/coding#tree_comm_title'
  })
</script>
<link rel="stylesheet" media="all" href="https://cn-assets.gitee.com/webpacks/css/side_toolbar_feedback-5dcc1be9cca438cc952f.css" />
<script src="https://cn-assets.gitee.com/webpacks/side_toolbar_feedback-f6a366a5816022cb4a0a.bundle.js"></script>


<script src="https://cn-assets.gitee.com/webpacks/side_toolbar_feedback-f6a366a5816022cb4a0a.bundle.js"></script>


<!-- 测试网页情况 -->
<script>
  (function() {
    this.__gac = {
      domain: 'www.oschina.net'
    };
  
  }).call(this);
</script>

<script src="https://cn-assets.gitee.com/webpacks/build_status-7effc7b22ddf8e90b34c.bundle.js"></script>
<script src="https://cn-assets.gitee.com/webpacks/scan_status-7a19032286b03591b228.bundle.js"></script>
<script src="https://cn-assets.gitee.com/webpacks/mermaid_render-669e055f02596b5d8886.bundle.js"></script>
<script src="https://cn-assets.gitee.com/webpacks/check_runs-19ec228348982570119a.bundle.js"></script>
</body>
</html>
